I mean, when you have a sprite moving on any direction, if you take a diagonal movement and then stops, the 8 direction behavoir corrects automatically the position, setting it to one of the default facing left, right, up or down positions. Here is a capx for best explaining.
How to avoid it? Any suggestion?
Develop games in your browser. Powerful, performant & highly capable.
I tried it with the keyboard and it looks like the problem is that when you're releasing the keys the last one released is counted as a movement, that's why the sprite turns to that angle, you can fix that by adding an event
if key is not down up
and key is not down down
and key is not down right
and key is not down left
sprite stop 8 direction
Thanks Lof, it's a good trick. Bad side is that you lose deceleration properties.
so here is another little trick for you:
if up+down+left+right is not down
set golval var sAngle to sprite.angle
sprite set angle to sAngle