Camera not moving in game view

Not sure if this a bug or something I’ve done that has locked up the camera. Asked this before but still unable to resolve this issue months down the line. I’m trying to move the camera using basic camera.transform.position. It moves in scene view but not in game view. Weird thing is, I can see the x,y digits changing in inspector when game is running in game view but nothing is moving!

Hoping someone else may have run into similar problem and knows a possible solution or can point me in the right direction.

I’ll take a wild guess and say maybe you have a second camera in scene and that’s the one you’re watching?

OR… everything is a child of the camera so moving it does not move what it sees.

Finally, delete the camera… you better not see anything in that case! If you do, well, start looking for why.

And just for completeness…

Camera stuff is pretty tricky… you may wish to consider using Cinemachine from the Unity Package Manager.

There’s even a dedicated forum: Unity Engine - Unity Discussions

If you insist on making your own camera controller, the simplest way to do it is to think in terms of two Vector3 points in space: where the camera is LOCATED and where the camera is LOOKING.

private Vector3 WhereMyCameraIsLocated;
private Vector3 WhatMyCameraIsLookingAt;

void LateUpdate()
{
  cam.transform.position = WhereMyCameraIsLocated;
  cam.transform.LookAt( WhatMyCameraIsLookingAt);
}

Then you just need to update the above two points based on your GameObjects, no need to fiddle with rotations.