debug: log movement controller inputs/state/velocity each frame

This commit is contained in:
2026-06-03 17:05:07 -04:00
parent 6c57f70fb4
commit 5cb2013d6c
+12
View File
@@ -51,6 +51,18 @@ func _process(_delta: float) -> void:
sm.input_dash = Input.is_action_just_pressed("dash") and not sm.input_dash
sm.input_dir = Input.get_vector("move_left", "move_right", "move_forward", "move_back")
# DEBUG: confirm controller is receiving input and machine state each frame
var p = sm.player
print("MOVEMENT_DEBUG state=%s vel=%s input_dir=%s jump=%s sprint=%s crouch=%s dash=%s" % [
sm.current_state,
p.velocity if p else "NO_PLAYER",
sm.input_dir,
sm.input_jump_pressed,
sm.input_sprint,
sm.input_crouch,
sm.input_dash,
])
func _on_movement_event(ev: String, data: Dictionary) -> void:
if ev == "chain_updated":