Hi,
I have a character that has both an idle animation and a walk animation.
When my character enters a new scene, I want them to be in the idle DOWN animation if they were walking down and the idle UP animation if they were walking up.
For some reason they are always facing down (idle DOWN is the first frame of idle animation).
When my character enters a new scene FACING UP, their singleton playerDirection will == “Up” which should trigger animationPlayer.play(“Idle_UP”). But this doesn’t seem to be happening. They are always in the “Idle_DOWN” animation when a new scene starts (I suspect it is just the first frame of my animation).
func _ready():
self.position = Global.playerPosition
if Global.playerDirection == "Up":
animationPlayer.play("Idle_UP")
elif Global.playerDirection == "Down":
animationPlayer.play("Idle_DOWN")
Why can I not trigger the “Idle_UP” animation from the _ready function?