Advertisement
Guest User

rotate

a guest
Mar 28th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. forward = cam_main.transform.TransformDirection(Vector3.forward); // Judge where the forward direction is relative to the Main Camera.
  2.                 forward.y = 0; // make the y axis 0 to ensure we just have the direction.
  3.                 forward = forward.normalized;
  4.                 right = new Vector3(forward.z, 0, -forward.x); //Find the which direction is right by using the forward direction.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement