SHARE
TWEET

Untitled

a guest Feb 14th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void LateUpdate(){ // Script in main camera
  2.     offset = Quaternion.AngleAxis(Input.GetAxis("Mouse X") * mouseSense * Time.deltaTime, Vector3.up) *
  3.                   Quaternion.AngleAxis(Input.GetAxis("Mouse Y") * mouseSense * Time.deltaTime, Vector3.left) * offset;
  4.     offset.y = Mathf.Clamp(offset.y, pitchMinMax.x, pitchMinMax.y); // This is my attempt
  5.     transform.position = playerBody.position + offset;
  6.     transform.LookAt(playerBody.position);
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top