Orienting ship movement in asteroids [closed]
- by BadSniper
Possible Duplicate:
Move sprite in the direction it is facing?
I'm programming asteroids game. I'm trying to give velocity in the direction of ship face.
I've tried using velocity.x = velocity.x * cos r, velocity.y = velocity.y * sin r
where velocity is a vector and r is the angle rotated.
but it's not moving in right direction. Could someone help with this problem? It is supposed to return the vector in which ship is facing. I don't understand the problem.