Animation Idle Troubles

Godot Version



How could I play animations (left and right only) in a top down rpg without flipping? You can move in all 4 directions but don’t have an up or down animation.

I tried with an animation tree but it wouldn’t work. The player would either be stuck in the left animation entirely or play the right animation and immediately return to the left animation upon releasing “ui_right” rather than staying put the right animation.

Animation trees also require you to create a “triangle” but I only have 2 animations.

Can you screenshot and show your animation tree?

Honestly thought, that might be overkill. Making a variable to track which position you were going in last may be easier:

var facing_right = true

# then somewhere in your process...

if Input.is_action_pressed("move_right"):
    facing_right = true
elif Input.is_action_pressed("move_left"):
    facing_right = false

You can use a BlendSpace1D in an animation tree, and then set the blend_position from your movement code to a float (e.g. where -1 is left and +1 is right). No triangle required.

Note that the blend mode of your blend space and the update mode of your animation need to match; otherwise the animation will silently fail to play.