Notice: I am a beginner in unity so I apologize in advance for any stupid questions.
My main camera in play mode is rotating on a point instead of the center. It’s kind of hard to explain but instead of rotating from the center, it’s rotating from he corner. I have no idea why this is happening. I just opened unity to find this.
EDIT: It basically is tilting on the X axis instead of rotating on the Y axis.
For all things camera I always recommend using Cinemachine. The time you spend getting familiar is well worth it.
If you wrote the camera control code, to help gain more insight into your problem, I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.
Doing this should help you answer these types of questions:
- is this code even running? which parts are running? how often does it run?
- what are the values of the variables involved? Are they initialized?
Knowing this information will help you reason about the behavior you are seeing.