Greetings ![]()
I’m using this bit of code to rotate my camera around the player on the X axis:
// Set axis in accordance to local direction
Vector3 _x = transform.TransformDirection(Vector3.right);
// player.position = pivot, _x = axis, lookVect.y = speed
transform.RotateAround(player.position, _x, lookVect.y);
It’s working great so far, but I want to limit how far up and down you can rotate the cam, and I can’t find a way to use Mathf.Clamp, any suggestions?