GetBodyRotationMatrix alternative for FP3

Topics: User Forum
Aug 20, 2010 at 11:01 AM
Edited Aug 20, 2010 at 1:06 PM

In FP2 I used GetBodyRotationMatrix on a player to produce a vector in the direction the player is facing so that I could fire a bullet in that direction. GetBodyRotationMatrix is missing in FP3. I tried using GetTransform and it was much more complicated to get a vector in the direction faced by the player. Is there a better way to do this?

 

Edit: Never mind, I should have simply used something like this:

Vector2 directionVector = new Vector2((float)Math.Cos((double)Body.Rotation),
                        (float)Math.Sin((double)Body.Rotation));

 

Maybe there should be a member of Body returns a direction vector?