This project has moved and is read-only. For the latest updates, please go here.

GetBodyRotationMatrix alternative for FP3

Topics: User Forum
Aug 20, 2010 at 12:01 PM
Edited Aug 20, 2010 at 2: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),


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