![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Diogoamorim27 |
It seems when i have an animated sprite i can just use for example:
"if Input.is_action_pressed(“ui_left):
$Sprite.play(“Run”)”
But when its an AnimationPlayer in a regular sprite it only works if its “is_action_just_pressed” wich is not always optimal as in a platformer game for exemple.
I understand that it doenst work in animationPlayer because it tries to start it over every frame, but that makes the coding a lot more complicated.
Is there a way to just use “is_action_pressed” with spritesheets?