Godot Version
godot 4
Question
pls help
Something like this should work:
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("ui_left"):
animated_sprite.frame -= 1
elif event.is_action_pressed("ui_right"):
animated_sprite.frame += 1
You can specify your actions in the InputMap to be used instead of the built-in ones “ui_left” and “ui_right”.
thank you so much!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.