- Home /
Clamping RotateAround
Is there any simple way to clamp RotateAround function?
cameraCharacter.transform.RotateAround (transform.position, cameraCharacter.transform.right, Time.deltaTime * 100 * Input.GetAxis ("Mouse Y"));
I have this line. I would like to clamp it so it can't go lower and greater than specific values.
Answer by Beks_Omega · Jul 06, 2017 at 08:39 PM
For anyone that finds this in the future here are some links on how to clamp it for the horizontal direction:
http://answers.unity3d.com/questions/400822/rotatearound-clamp-not-working.html
http://answers.unity3d.com/questions/438836/limit-camera-rotation-with-rotatearound.html
And here are some for the vertical direction:
http://answers.unity3d.com/questions/438836/limit-camera-rotation-with-rotatearound.html
Your answer
Follow this Question
Related Questions
Rotating and orbiting an game object with a stop angle 0 Answers
How to Math.f Clamp this 0 Answers
I can't figure out how to clamp it 2 Answers
Rotate camera up and down with mouse input with to min and max 2 Answers
Camera Orbit Rotation Problem 0 Answers