Add 8 animations to Sprite which also has 8 dir motion
walk0
walk1
walk2
walk3
walk4
walk5
walk6
walk7
These should each have the frames for the directional movement.
Then: (simplistic approach)
every tick
sprite set animation:
"walk"&ceil(8*(1+Sprite.8Direction.MovingAngle/360)-0.5)%8
play from current frame
Voila ....
This is such a simple way of doing 8 way animations. Though I am having an issue with figuring out which of the walk0 - walk7 handles what direction animation.
Is there an order of the directions.. Like walk0 = up, walk1 = down ?
I assumed that from 0 - 7 it would be:
0 = up
1 = up-right
2 = right
3 = down-right
4 = down
5 = down-left
6 = left
7 = up-left
But when I implement it it seems almost backwards or off.