- Home /
Rotating a tilted camera to look around
I have a perspective camera that moves around looking for objects. I would like to be able to rotate the camera maintaining the same angle down. Just like a person turning in a circle looking down.
I cannot rotate on Y since Y is not up because of the tilt. Rotation on the true up is needed.
LookAt(TransForm) will not work because the camera is not looking at anything.
Maybe I could have a point travel around the camera and have LookAt(Vector3)follow it.
Help please.
Answer by robertbu · Feb 12, 2014 at 06:03 PM
Without seeing your code it is hard to be sure of your problem. As a guess, I'd say you are using Transform.Rotate() to rotate your camera. If so, Rotate() uses local coordinates by default. A solution is to use the optional second parameter:
transform.Rotate(Vector3.up * amount, Space.World);
Or if you are using the three parameter version:
transform.Rotate(0.0, amount, 0.0, Space.World);
That works perfectly. I did not know about the Space.World parameter. Thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220613133313im_/https://answers.unity.com/themes/thub/images/avi.jpg)