Strange Camera Movement

Hi,

I have my game divided into different parts/scenes which are loaded when needed. I am using the freelook cinemachine camera. After I hit a play button in my game menu, the player and map are loaded additionally. The freelook target and look at is then set to the player using a script.
When the freelook is placed in a different scene than the player the camera makes strange movements as if it was placed somewhere else and now moves and rotates towards the player. Camera GameObject as well as the freelook GameObject are placed exactly at the same place where the player is (in inspector before starting the game).
But if I place the freelook GameObject in the same scene as the Player (as a sibling not as a child), there is no such movement and the camera is immediately at the supposed position.

Has anyone faced the same issues or knows how to resolve it other than having the freelook camera in the same scene as the player?

In your script that assigns the player as FreeLook target, be sure also to set freeLook.PreviousStateIsValid = false. That will cancel the freeLook's memory of where it was, and so it won't lerp to the new position.

1 Like

Ah yes, apparently that was the issue. Thank you very much!

1 Like