feat: added animations for movement

This commit is contained in:
DottsGit
2026-06-05 13:42:18 -04:00
parent 72346803a9
commit 8984739334
2 changed files with 173 additions and 18 deletions
+6
View File
@@ -278,6 +278,12 @@ func _physics_process(_delta: float) -> void:
sm.input_dir = raw_input
sm.wish_dir_world = world_dir
# Update humanoid model animation state
var humanoid = get_node_or_null("HumanoidModel")
if humanoid:
var h_speed = Vector2(velocity.x, velocity.z).length()
humanoid.update_state(sm.current_state, h_speed, sm.input_crouch)
func _on_movement_event(ev: String, data: Dictionary) -> void:
if ev == "chain_updated":