Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void LateUpdate(){ // Script in main camera
- offset = Quaternion.AngleAxis(Input.GetAxis("Mouse X") * mouseSense * Time.deltaTime, Vector3.up) *
- Quaternion.AngleAxis(Input.GetAxis("Mouse Y") * mouseSense * Time.deltaTime, Vector3.left) * offset;
- offset.y = Mathf.Clamp(offset.y, pitchMinMax.x, pitchMinMax.y); // This is my attempt
- transform.position = playerBody.position + offset;
- transform.LookAt(playerBody.position);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement