Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward = cam_main.transform.TransformDirection(Vector3.forward); // Judge where the forward direction is relative to the Main Camera.
- forward.y = 0; // make the y axis 0 to ensure we just have the direction.
- forward = forward.normalized;
- 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