diff --git a/addons/fpc/character.gd b/addons/fpc/character.gd index bced8b6..2138cd8 100644 --- a/addons/fpc/character.gd +++ b/addons/fpc/character.gd @@ -171,6 +171,8 @@ func handle_state(moving): enter_normal_state() +# Any enter state function should only be called once when you want to enter that state, not every frame. + func enter_normal_state(): #print("entering normal state") var prev_state = state @@ -206,10 +208,10 @@ func update_collision_scale(): func headbob_animation(moving): if moving and is_on_floor(): - CAMERA_ANIMATION.play("headbob", 0.5) + CAMERA_ANIMATION.play("headbob", 0.25) CAMERA_ANIMATION.speed_scale = (speed / base_speed) * 1.75 else: - CAMERA_ANIMATION.play("RESET", 0.5) + CAMERA_ANIMATION.play("RESET", 0.25) func _process(delta): diff --git a/addons/fpc/debug.gd b/addons/fpc/debug.gd index 7708cd7..c9fff9e 100644 --- a/addons/fpc/debug.gd +++ b/addons/fpc/debug.gd @@ -5,7 +5,7 @@ func _process(delta): if visible: pass -func add_property(title:String, value, order): +func add_property(title : String, value, order : int): var target target = $MarginContainer/VBoxContainer.find_child(title, true, false) if !target: diff --git a/test_world.tscn b/test_world.tscn index 93dd8c1..4c7ff79 100644 --- a/test_world.tscn +++ b/test_world.tscn @@ -32,7 +32,7 @@ ssao_enabled = true [node name="test_world" type="Node3D"] -[node name="character" parent="." instance=ExtResource("1_e18vq")] +[node name="Character" parent="." instance=ExtResource("1_e18vq")] [node name="CSGBox3D" type="CSGBox3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)