瀏覽代碼

Switch to Bullet and use a SpringArm node for the camera

Aaron Franke 5 年之前
父節點
當前提交
429ddd108b
共有 5 個文件被更改,包括 72 次插入42 次删除
  1. 14 3
      enemies/red_robot/red_robot.tscn
  2. 4 4
      level/level.tscn
  3. 25 19
      player/player.gd
  4. 23 15
      player/player.tscn
  5. 6 1
      project.godot

+ 14 - 3
enemies/red_robot/red_robot.tscn

@@ -192,7 +192,7 @@ nodes/hit3/position = Vector2( 980, 240 )
 nodes/output/position = Vector2( 1180, 200 )
 nodes/output/position = Vector2( 1180, 200 )
 nodes/state/node = SubResource( 25 )
 nodes/state/node = SubResource( 25 )
 nodes/state/position = Vector2( 60, 100 )
 nodes/state/position = Vector2( 60, 100 )
-node_connections = [ "output", 0, "hit3", "state", 0, "Animation", "state", 1, "Animation 3", "state", 2, "Animation 2", "state", 3, "Animation 4", "hit2", 0, "hit1", "hit2", 1, "Animation 6", "hit3", 0, "hit2", "hit3", 1, "Animation 7", "aiming", 0, "state", "aiming", 1, "aim", "hit1", 0, "aiming", "hit1", 1, "Animation 5" ]
+node_connections = [ "output", 0, "hit3", "state", 0, "Animation", "state", 1, "Animation 3", "state", 2, "Animation 2", "state", 3, "Animation 4", "aiming", 0, "state", "aiming", 1, "aim", "hit1", 0, "aiming", "hit1", 1, "Animation 5", "hit2", 0, "hit1", "hit2", 1, "Animation 6", "hit3", 0, "hit2", "hit3", 1, "Animation 7" ]
 
 
 [sub_resource type="SphereShape" id=27]
 [sub_resource type="SphereShape" id=27]
 radius = 1.11815
 radius = 1.11815
@@ -542,13 +542,18 @@ tracks/10/keys = {
 [sub_resource type="AudioStreamRandomPitch" id=44]
 [sub_resource type="AudioStreamRandomPitch" id=44]
 audio_stream = ExtResource( 18 )
 audio_stream = ExtResource( 18 )
 
 
-[node name="big_robot" type="KinematicBody"]
+[node name="RedRobot" type="KinematicBody"]
+collision_layer = 3
+collision_mask = 3
 script = ExtResource( 1 )
 script = ExtResource( 1 )
 
 
 [node name="Scene Root" parent="." instance=ExtResource( 2 )]
 [node name="Scene Root" parent="." instance=ExtResource( 2 )]
 
 
+[node name="Skeleton" parent="Scene Root/Armature" index="0"]
+bones/14/bound_children = [ NodePath("ray_from") ]
+
 [node name="ray_from" type="BoneAttachment" parent="Scene Root/Armature/Skeleton" index="4"]
 [node name="ray_from" type="BoneAttachment" parent="Scene Root/Armature/Skeleton" index="4"]
-transform = Transform( -0.999975, 0.0070746, 0.000551782, 0.00707948, 0.999931, 0.0094271, -0.000485051, 0.00943077, -0.999955, 0.00850569, 2.08377, 0.183162 )
+transform = Transform( -0.862541, 0.0793345, -0.499729, -0.033231, 0.976617, 0.2124, 0.504895, 0.19981, -0.839736, 0.123715, 2.00738, 0.252644 )
 bone_name = "CannonAnimRecoil"
 bone_name = "CannonAnimRecoil"
 
 
 [node name="ray" type="MeshInstance" parent="Scene Root/Armature/Skeleton/ray_from"]
 [node name="ray" type="MeshInstance" parent="Scene Root/Armature/Skeleton/ray_from"]
@@ -631,6 +636,8 @@ visible = false
 
 
 [node name="part_shield1" type="RigidBody" parent="death"]
 [node name="part_shield1" type="RigidBody" parent="death"]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.37822, 1.11034, 1.09121 )
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.37822, 1.11034, 1.09121 )
+collision_layer = 3
+collision_mask = 3
 mode = 1
 mode = 1
 physics_material_override = SubResource( 30 )
 physics_material_override = SubResource( 30 )
 
 
@@ -666,6 +673,8 @@ color_ramp = SubResource( 35 )
 
 
 [node name="part_shield2" type="RigidBody" parent="death"]
 [node name="part_shield2" type="RigidBody" parent="death"]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.75083, 1.02975, 0.162546 )
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.75083, 1.02975, 0.162546 )
+collision_layer = 3
+collision_mask = 3
 mode = 1
 mode = 1
 physics_material_override = SubResource( 36 )
 physics_material_override = SubResource( 36 )
 
 
@@ -701,6 +710,8 @@ color_ramp = SubResource( 35 )
 
 
 [node name="part_shield3" type="RigidBody" parent="death"]
 [node name="part_shield3" type="RigidBody" parent="death"]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0374503, 1.02975, 0.162546 )
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0374503, 1.02975, 0.162546 )
+collision_layer = 3
+collision_mask = 3
 mode = 1
 mode = 1
 physics_material_override = SubResource( 39 )
 physics_material_override = SubResource( 39 )
 angular_damp = 0.3
 angular_damp = 0.3

+ 4 - 4
level/level.tscn

@@ -223,16 +223,16 @@ data = ExtResource( 5 )
 [node name="Player" parent="." instance=ExtResource( 6 )]
 [node name="Player" parent="." instance=ExtResource( 6 )]
 transform = Transform( -0.575826, 0, -0.817573, 0, 1, 0, 0.817573, 0, -0.575826, 64.8183, -1.0765, 78.7639 )
 transform = Transform( -0.575826, 0, -0.817573, 0, 1, 0, 0.817573, 0, -0.575826, 64.8183, -1.0765, 78.7639 )
 
 
-[node name="big_robot" parent="." instance=ExtResource( 7 )]
+[node name="RedRobot1" parent="." instance=ExtResource( 7 )]
 transform = Transform( 0.843905, 0, -0.536493, 0, 1, 0, 0.536493, 0, 0.843905, 71.5907, -6.05686, 46.2736 )
 transform = Transform( 0.843905, 0, -0.536493, 0, 1, 0, 0.536493, 0, 0.843905, 71.5907, -6.05686, 46.2736 )
 
 
-[node name="big_robot2" parent="." instance=ExtResource( 7 )]
+[node name="RedRobot2" parent="." instance=ExtResource( 7 )]
 transform = Transform( 0.338334, 0, 0.941027, 0, 1, 0, -0.941027, 0, 0.338334, 53.2126, -6.05686, 15.9321 )
 transform = Transform( 0.338334, 0, 0.941027, 0, 1, 0, -0.941027, 0, 0.338334, 53.2126, -6.05686, 15.9321 )
 
 
-[node name="big_robot3" parent="." instance=ExtResource( 7 )]
+[node name="RedRobot3" parent="." instance=ExtResource( 7 )]
 transform = Transform( -0.164432, 0, 0.986389, 0, 1, 0, -0.986389, 0, -0.164432, -2.96096, -11.6923, 20.2343 )
 transform = Transform( -0.164432, 0, 0.986389, 0, 1, 0, -0.986389, 0, -0.164432, -2.96096, -11.6923, 20.2343 )
 
 
-[node name="big_robot4" parent="." instance=ExtResource( 7 )]
+[node name="RedRobot4" parent="." instance=ExtResource( 7 )]
 transform = Transform( -0.164432, 0, 0.986389, 0, 1, 0, -0.986389, 0, -0.164432, -9.15526, -11.6923, -16.9238 )
 transform = Transform( -0.164432, 0, 0.986389, 0, 1, 0, -0.986389, 0, -0.164432, -9.15526, -11.6923, -16.9238 )
 
 
 [node name="sound_outside" type="Area" parent="."]
 [node name="sound_outside" type="Area" parent="."]

+ 25 - 19
player/player.gd

@@ -24,6 +24,13 @@ var camera_x_rot = 0.0
 
 
 onready var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") * ProjectSettings.get_setting("physics/3d/default_gravity_vector")
 onready var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") * ProjectSettings.get_setting("physics/3d/default_gravity_vector")
 
 
+onready var animation_tree = $AnimationTree
+onready var camera_base = $CameraBase
+onready var camera_animation = $CameraBase/Animation
+onready var camera_rot = $CameraBase/CameraRot
+onready var camera_spring_arm = $CameraBase/CameraRot/SpringArm
+onready var camera = $CameraBase/CameraRot/SpringArm/Camera
+
 func _init():
 func _init():
 	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
 	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
 
 
@@ -45,7 +52,7 @@ func _physics_process(delta):
 								Input.get_action_strength("move_back") - Input.get_action_strength("move_forward"))
 								Input.get_action_strength("move_back") - Input.get_action_strength("move_forward"))
 	motion = motion.linear_interpolate(motion_target, MOTION_INTERPOLATE_SPEED * delta)
 	motion = motion.linear_interpolate(motion_target, MOTION_INTERPOLATE_SPEED * delta)
 	
 	
-	var camera_basis = $CameraBase/CameraRot.global_transform.basis
+	var camera_basis = camera_rot.global_transform.basis
 	var camera_z = camera_basis.z
 	var camera_z = camera_basis.z
 	var camera_x = camera_basis.x
 	var camera_x = camera_basis.x
 	
 	
@@ -59,9 +66,9 @@ func _physics_process(delta):
 	if aiming != current_aim:
 	if aiming != current_aim:
 			aiming = current_aim
 			aiming = current_aim
 			if (aiming):
 			if (aiming):
-				$CameraBase/Animation.play("shoot")
+				camera_animation.play("shoot")
 			else:
 			else:
-				$CameraBase/Animation.play("far")
+				camera_animation.play("far")
 	
 	
 	# Jump/in-air logic.
 	# Jump/in-air logic.
 	airborne_time += delta
 	airborne_time += delta
@@ -75,23 +82,23 @@ func _physics_process(delta):
 	if not on_air and Input.is_action_just_pressed("jump"):
 	if not on_air and Input.is_action_just_pressed("jump"):
 		velocity.y = JUMP_SPEED
 		velocity.y = JUMP_SPEED
 		on_air = true
 		on_air = true
-		$AnimationTree["parameters/state/current"] = 2
+		animation_tree["parameters/state/current"] = 2
 		$sfx/jump.play()
 		$sfx/jump.play()
 	
 	
 	if on_air:
 	if on_air:
 		if (velocity.y > 0):
 		if (velocity.y > 0):
-			$AnimationTree["parameters/state/current"] = 2
+			animation_tree["parameters/state/current"] = 2
 		else:
 		else:
-			$AnimationTree["parameters/state/current"] = 3
+			animation_tree["parameters/state/current"] = 3
 	elif aiming:
 	elif aiming:
 		# Change state to strafe.
 		# Change state to strafe.
-		$AnimationTree["parameters/state/current"] = 0
+		animation_tree["parameters/state/current"] = 0
 		
 		
 		# Change aim according to camera rotation.
 		# Change aim according to camera rotation.
 		if camera_x_rot >= 0: # Aim up.
 		if camera_x_rot >= 0: # Aim up.
-			$AnimationTree["parameters/aim/add_amount"] = -camera_x_rot / deg2rad(CAMERA_X_ROT_MAX)
+			animation_tree["parameters/aim/add_amount"] = -camera_x_rot / deg2rad(CAMERA_X_ROT_MAX)
 		else: # Aim down.
 		else: # Aim down.
-			$AnimationTree["parameters/aim/add_amount"] = camera_x_rot / deg2rad(CAMERA_X_ROT_MIN)
+			animation_tree["parameters/aim/add_amount"] = camera_x_rot / deg2rad(CAMERA_X_ROT_MIN)
 		
 		
 		# Convert orientation to quaternions for interpolating rotation.
 		# Convert orientation to quaternions for interpolating rotation.
 		var q_from = orientation.basis.get_rotation_quat()
 		var q_from = orientation.basis.get_rotation_quat()
@@ -100,17 +107,16 @@ func _physics_process(delta):
 		orientation.basis = Basis(q_from.slerp(q_to, delta * ROTATION_INTERPOLATE_SPEED))
 		orientation.basis = Basis(q_from.slerp(q_to, delta * ROTATION_INTERPOLATE_SPEED))
 		
 		
 		# The animation's forward/backward axis is reversed.
 		# The animation's forward/backward axis is reversed.
-		$AnimationTree["parameters/strafe/blend_position"] = Vector2(motion.x, -motion.y)
+		animation_tree["parameters/strafe/blend_position"] = Vector2(motion.x, -motion.y)
 		
 		
-		root_motion = $AnimationTree.get_root_motion_transform()
+		root_motion = animation_tree.get_root_motion_transform()
 		
 		
 		if Input.is_action_pressed("shoot") and $FireCooldown.time_left == 0:
 		if Input.is_action_pressed("shoot") and $FireCooldown.time_left == 0:
 			var shoot_from = $"Scene Root/Robot_Skeleton/Skeleton/GunBone/ShootFrom".global_transform.origin
 			var shoot_from = $"Scene Root/Robot_Skeleton/Skeleton/GunBone/ShootFrom".global_transform.origin
-			var cam = $CameraBase/CameraRot/Camera
 			
 			
 			var ch_pos = $Crosshair.rect_position + $Crosshair.rect_size * 0.5
 			var ch_pos = $Crosshair.rect_position + $Crosshair.rect_size * 0.5
-			var ray_from = cam.project_ray_origin(ch_pos)
-			var ray_dir = cam.project_ray_normal(ch_pos)
+			var ray_from = camera.project_ray_origin(ch_pos)
+			var ray_dir = camera.project_ray_normal(ch_pos)
 			
 			
 			var shoot_target
 			var shoot_target
 			var col = get_world().direct_space_state.intersect_ray(ray_from, ray_from + ray_dir * 1000, [self])
 			var col = get_world().direct_space_state.intersect_ray(ray_from, ray_from + ray_dir * 1000, [self])
@@ -137,13 +143,13 @@ func _physics_process(delta):
 			orientation.basis = Basis(q_from.slerp(q_to, delta * ROTATION_INTERPOLATE_SPEED))
 			orientation.basis = Basis(q_from.slerp(q_to, delta * ROTATION_INTERPOLATE_SPEED))
 		
 		
 		# Aim to zero (no aiming while walking).
 		# Aim to zero (no aiming while walking).
-		$AnimationTree["parameters/aim/add_amount"] = 0
+		animation_tree["parameters/aim/add_amount"] = 0
 		# Change state to walk.
 		# Change state to walk.
-		$AnimationTree["parameters/state/current"] = 1
+		animation_tree["parameters/state/current"] = 1
 		# Blend position for walk speed based on motion.
 		# Blend position for walk speed based on motion.
-		$AnimationTree["parameters/walk/blend_position"] = Vector2(motion.length(), 0) 
+		animation_tree["parameters/walk/blend_position"] = Vector2(motion.length(), 0) 
 		
 		
-		root_motion = $AnimationTree.get_root_motion_transform()
+		root_motion = animation_tree.get_root_motion_transform()
 	
 	
 	# Apply root motion to orientation.
 	# Apply root motion to orientation.
 	orientation *= root_motion
 	orientation *= root_motion
@@ -173,4 +179,4 @@ func rotate_camera(move):
 	$CameraBase.orthonormalize() # After relative transforms, camera needs to be renormalized.
 	$CameraBase.orthonormalize() # After relative transforms, camera needs to be renormalized.
 	camera_x_rot += move.y
 	camera_x_rot += move.y
 	camera_x_rot = clamp(camera_x_rot, deg2rad(CAMERA_X_ROT_MIN), deg2rad(CAMERA_X_ROT_MAX))
 	camera_x_rot = clamp(camera_x_rot, deg2rad(CAMERA_X_ROT_MIN), deg2rad(CAMERA_X_ROT_MAX))
-	$CameraBase/CameraRot.rotation.x = camera_x_rot
+	camera_rot.rotation.x = camera_x_rot

+ 23 - 15
player/player.tscn

@@ -126,7 +126,7 @@ y_label = "gun"
 
 
 [sub_resource type="AnimationNodeBlendTree" id=22]
 [sub_resource type="AnimationNodeBlendTree" id=22]
 resource_local_to_scene = true
 resource_local_to_scene = true
-graph_offset = Vector2( -480.904, 74.268 )
+graph_offset = Vector2( 1, 85 )
 nodes/aim/node = SubResource( 1 )
 nodes/aim/node = SubResource( 1 )
 nodes/aim/position = Vector2( 380, 120 )
 nodes/aim/position = Vector2( 380, 120 )
 nodes/aimdown/node = SubResource( 2 )
 nodes/aimdown/node = SubResource( 2 )
@@ -155,14 +155,14 @@ nodes/walk/position = Vector2( -400, 40 )
 node_connections = [ "output", 0, "eye_blend", "state", 0, "strafe", "state", 1, "walk", "state", 2, "jumpup", "state", 3, "jumpdown", "land", 0, "state", "land", 1, "hardland", "aim", 0, "aimdown", "aim", 1, "land", "aim", 2, "aimup", "eye_blend", 0, "aim", "eye_blend", 1, "eyes" ]
 node_connections = [ "output", 0, "eye_blend", "state", 0, "strafe", "state", 1, "walk", "state", 2, "jumpup", "state", 3, "jumpdown", "land", 0, "state", "land", 1, "hardland", "aim", 0, "aimdown", "aim", 1, "land", "aim", 2, "aimup", "eye_blend", 0, "aim", "eye_blend", 1, "eyes" ]
 
 
 [sub_resource type="CapsuleShape" id=23]
 [sub_resource type="CapsuleShape" id=23]
-radius = 0.490082
-height = 0.560254
+radius = 0.5
+height = 0.6
 
 
 [sub_resource type="RayShape" id=24]
 [sub_resource type="RayShape" id=24]
 
 
 [sub_resource type="Animation" id=25]
 [sub_resource type="Animation" id=25]
 tracks/0/type = "value"
 tracks/0/type = "value"
-tracks/0/path = NodePath("CameraRot/Camera:translation")
+tracks/0/path = NodePath("CameraRot/SpringArm:translation")
 tracks/0/interp = 1
 tracks/0/interp = 1
 tracks/0/loop_wrap = true
 tracks/0/loop_wrap = true
 tracks/0/imported = false
 tracks/0/imported = false
@@ -171,7 +171,7 @@ tracks/0/keys = {
 "times": PoolRealArray( 0, 1 ),
 "times": PoolRealArray( 0, 1 ),
 "transitions": PoolRealArray( 0.287175, 1 ),
 "transitions": PoolRealArray( 0.287175, 1 ),
 "update": 3,
 "update": 3,
-"values": [ Vector3( 0, 0.593, -2.157 ), Vector3( 0, 0.593, -2.157 ) ]
+"values": [ Vector3( 0, 0, 0 ), Vector3( 0, 0, 0 ) ]
 }
 }
 tracks/1/type = "value"
 tracks/1/type = "value"
 tracks/1/path = NodePath("../Crosshair:self_modulate")
 tracks/1/path = NodePath("../Crosshair:self_modulate")
@@ -188,7 +188,7 @@ tracks/1/keys = {
 
 
 [sub_resource type="Animation" id=26]
 [sub_resource type="Animation" id=26]
 tracks/0/type = "value"
 tracks/0/type = "value"
-tracks/0/path = NodePath("CameraRot/Camera:translation")
+tracks/0/path = NodePath("CameraRot/SpringArm:translation")
 tracks/0/interp = 1
 tracks/0/interp = 1
 tracks/0/loop_wrap = true
 tracks/0/loop_wrap = true
 tracks/0/imported = false
 tracks/0/imported = false
@@ -197,7 +197,7 @@ tracks/0/keys = {
 "times": PoolRealArray( 0, 1 ),
 "times": PoolRealArray( 0, 1 ),
 "transitions": PoolRealArray( 0.233259, 1 ),
 "transitions": PoolRealArray( 0.233259, 1 ),
 "update": 3,
 "update": 3,
-"values": [ Vector3( -0.684193, 0.265504, -1.04126 ), Vector3( -0.684193, 0.265504, -1.04126 ) ]
+"values": [ Vector3( -0.6, -0.3, 1.1 ), Vector3( -0.6, -0.3, 1.1 ) ]
 }
 }
 tracks/1/type = "value"
 tracks/1/type = "value"
 tracks/1/path = NodePath("../Crosshair:self_modulate")
 tracks/1/path = NodePath("../Crosshair:self_modulate")
@@ -216,7 +216,8 @@ tracks/1/keys = {
 audio_stream = ExtResource( 7 )
 audio_stream = ExtResource( 7 )
 
 
 [node name="Player" type="KinematicBody"]
 [node name="Player" type="KinematicBody"]
-collision_layer = 3
+collision_layer = 2
+collision_mask = 3
 script = ExtResource( 1 )
 script = ExtResource( 1 )
 
 
 [node name="Scene Root" parent="." instance=ExtResource( 2 )]
 [node name="Scene Root" parent="." instance=ExtResource( 2 )]
@@ -225,7 +226,7 @@ script = ExtResource( 1 )
 bones/46/bound_children = [ NodePath("GunBone") ]
 bones/46/bound_children = [ NodePath("GunBone") ]
 
 
 [node name="GunBone" type="BoneAttachment" parent="Scene Root/Robot_Skeleton/Skeleton" index="5"]
 [node name="GunBone" type="BoneAttachment" parent="Scene Root/Robot_Skeleton/Skeleton" index="5"]
-transform = Transform( 0.908797, -0.252345, 0.332564, -0.248902, -0.967057, -0.0539471, 0.335258, -0.0337236, -0.941535, -0.207594, 1.37206, 0.52221 )
+transform = Transform( 0.898624, -0.247907, 0.362217, -0.262223, -0.964987, -0.0102129, 0.352102, -0.0857715, -0.932036, -0.207116, 1.3624, 0.547539 )
 bone_name = "hand.R"
 bone_name = "hand.R"
 
 
 [node name="ShootFrom" type="Position3D" parent="Scene Root/Robot_Skeleton/Skeleton/GunBone"]
 [node name="ShootFrom" type="Position3D" parent="Scene Root/Robot_Skeleton/Skeleton/GunBone"]
@@ -247,16 +248,19 @@ parameters/state/current = 0
 parameters/strafe/blend_position = Vector2( 0, 0 )
 parameters/strafe/blend_position = Vector2( 0, 0 )
 parameters/walk/blend_position = Vector2( 0, 0 )
 parameters/walk/blend_position = Vector2( 0, 0 )
 
 
-[node name="CollisionShape" type="CollisionShape" parent="."]
-transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 1.03615, 0 )
+[node name="CapsuleShape" type="CollisionShape" parent="."]
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 1, 0 )
 shape = SubResource( 23 )
 shape = SubResource( 23 )
 
 
-[node name="CollisionShape2" type="CollisionShape" parent="."]
+[node name="RayShape" type="CollisionShape" parent="."]
 transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 1.00357, 0 )
 transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 1.00357, 0 )
 shape = SubResource( 24 )
 shape = SubResource( 24 )
 
 
+[node name="Spatial" type="Position3D" parent="."]
+transform = Transform( -1, 1.18511e-07, -3.03525e-07, 0, 0.931513, 0.363707, 3.25841e-07, 0.363707, -0.931513, 0, 2.44728, -2.15676 )
+
 [node name="CameraBase" type="Spatial" parent="."]
 [node name="CameraBase" type="Spatial" parent="."]
-transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.85456, 0 )
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0 )
 __meta__ = {
 __meta__ = {
 "_editor_description_": "Handles Y rotation (yaw)."
 "_editor_description_": "Handles Y rotation (yaw)."
 }
 }
@@ -266,8 +270,12 @@ __meta__ = {
 "_editor_description_": "Handles X rotation (pitch)."
 "_editor_description_": "Handles X rotation (pitch)."
 }
 }
 
 
-[node name="Camera" type="Camera" parent="CameraBase/CameraRot"]
-transform = Transform( -1, 1.18511e-07, -3.03526e-07, 0, 0.931514, 0.363707, 3.25841e-07, 0.363707, -0.931514, 0, 0.592719, -2.15676 )
+[node name="SpringArm" type="SpringArm" parent="CameraBase/CameraRot"]
+transform = Transform( -1, -1.11444e-07, 3.06191e-07, 0, 0.939693, 0.34202, -3.25841e-07, 0.34202, -0.939693, 0, 0, 0 )
+spring_length = 2.4
+
+[node name="Camera" type="Camera" parent="CameraBase/CameraRot/SpringArm"]
+transform = Transform( 1, 1.42109e-14, -2.84217e-14, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
 current = true
 current = true
 far = 300.0
 far = 300.0
 __meta__ = {
 __meta__ = {

+ 6 - 1
project.godot

@@ -194,9 +194,14 @@ toggle_fullscreen={
  ]
  ]
 }
 }
 
 
+[layer_names]
+
+3d_physics/layer_1="Level"
+3d_physics/layer_2="Player"
+
 [physics]
 [physics]
 
 
-3d/physics_engine="GodotPhysics"
+3d/physics_engine="Bullet"
 
 
 [rendering]
 [rendering]