Applying force along the body's angle.

Jun 2, 2011 at 12:00 AM
Edited Jun 2, 2011 at 5:58 AM

I've googled around but I cannot find a solution. For example if I'm making an asteroids kind of game, I would need to make the player go forward when up is pressed, but how do I do this if the player is rotated? ApplyForce applies the force in world orientation, so how can I apply a force with local orientation?


Edit: Never mind, did it with basic trigonometry.