Lol...This is stupid or I am stupid
I rotate a sprite in XNA and try to move it in direction it is facing..using the same bl**dy formula I used for Allegro that worked but no joy..
this is the code I am trying...
When I rotate press left or right I rotate the player.Code:player.velocity.X = (float)Math.Cos(MathHelper.ToRadians(player.rotation)); player.velocity.Y = (float)Math.Sin(MathHelper.ToRadians(player.rotation));
then I call the update function to add the velocity to the current position.
when I press up or down..the above code works out the direction it is facing..the new X and Y or it is supposed to at least..but it isn't working :@ :@
Any ideas?
Thanks