I'm working in XNA.
I have a float value called "Rotation". It goes from -3.14 to 3.14. It specifies the rotation of a sprite.
I want to use this value to produce a Vector with values for rotation on the X and Y axis.
For instance, if the sprite is turned directly to the right, i want to get the value (1, 0).
If it's turned directly upwards, i want (0, -1). You get the picture.
How would i go about this?
You use sine and cosine:
( Math.Cos(rotation), Math.Sin(rotation) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With