Hey Guys and Gals
I am working on a top down game. The player uses 8Direction Behavior for movement.
I am using this expression for movement animations
8Direction is moving | playerAnimations | "walk"&ceil(8*(1+player.8Direction.MovingAngle/360)-0.5)%8 (play from current frame)
And the same expression for attack and idle as well
player is Attacking | playerAnimations | "attack"&ceil(8*(1+player.8Direction.MovingAngle/360)-0.5)%8 (play from current frame)
X 8Direction is moving| playerAnimations | "idle"&ceil(8*(1+player.8Direction.MovingAngle/360)-0.5)%8 (play from current frame)
My movement animations are set as follows in one sprite:
Walk: Attack: Idle:
walk0 attack0 idle0
walk1 attack1 idle1
walk2 attack2 idle2
walk3 attack3 idle3
walk4 attack4 idle4
walk5 attack5 idle5
walk6 attack6 idle6
walk7 attack7 idle7
Everything is working as intended. Though when I move the player in any direction, on release of the directional button (d pad or key press) the player returns to facing to the right.
I would like to have it where if you are in motion in a particular direction, on stopping the player would stay facing in that direction, rather than returning home.. If that makes sense.