Issues with FollowCamera gameobject

Hello everyone, I’m having a problem with setting the Camera to follow the player.
Basically, if I move the child (Main Camera), the parent also moves, matching its position.
I’ve never had this problem in the past, but I never worked with cameras this way.

Also, if I paste component values from the player to FollowCamera, the position does not match. But, if I set the camera position to (0, 0, 0), Player and FollowCamera match.

How can I solve this problem?
Is this because I’m using version 2022.3.4f1, so they changed how cameras work?

Thank you for your help.

We’ll be switching to Cinemachine in a later section.

For now, it’s best if you put the FollowCamera object (the one with the script at the same position as the player (but not attached to the player, the script will make the followCamera object follow the player.
Then the Main Camera, as a child to FollowCamera, should be offset to show the character (the values wll be local values (relative to the player), so something like (0, 5, 5) in the transform, rotated to be facing the player on the Y axis and about 30 degrees on the X axis ought to do it.

You can also, with the FollowCamera object positioned at the same location as the player, select the Main Camera child object, move the scene view so the player is just to your liking in the framing, and then go to the top menu and select Component | Align With View

Privacy & Terms