09-05-2015, 11:19 PM
(09-05-2015, 10:27 PM)TheShyGuy Wrote: You could do it based on his velocity. Then, just use a bit of trig to determine the image_angle.
For example:
image_angle = inverseCosine(velocity.x / velocity.length).
Actually, it may be better to use the inverse of tangent and use the velocities X and Y component so that the rotation works for any direction.
Ah but thats my secret, I am almost physically incapable of math.