Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //now for the mouse rotation
- rotX += Input.GetAxis("Mouse X")*RotSpeed;
- rotY += Input.GetAxis ("Mouse Y")*RotSpeed;
- rotY = Mathf.Clamp(rotY, -90f, 90f);
- //Camera rotation only allowed if game us not paused
- Camera.transform.rotation = Quaternion.Euler(-rotY, 0f, 0f);
- transform.rotation = Quaternion.Euler(0f, rotX, 0f);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement