I'm trying to run animation of walking on my player, if i press right arrow the animations plays but i want it to loop as long as i hold the key.
Does anyone know how to do this?
This is some of the code:
velocity.y += delta * GRAVITY
velocity.x = - WALK_SPEED
velocity.x = WALK_SPEED
velocity.x = 0
anim = get_node("AnimationPlayer")