Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Vector3 RotationToDirection(Vector3 Rotation)
- {
- float z = Rotation.Z;
- float num = z * 0.0174532924f;
- float x = Rotation.X;
- float num2 = x * 0.0174532924f;
- float num3 = Math.Abs((float)Math.Cos((double)num2));
- return new Vector3
- {
- X = (float)((double)((float)(-(float)Math.Sin((double)num))) * (double)num3),
- Y = (float)((double)((float)Math.Cos((double)num)) * (double)num3),
- Z = (float)Math.Sin((double)num2)
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement