Changing Follow / Tracking at runtime with offset cause more offset

Hello !
I have an issue when I’m changing the follow target at runtime, it switches correctly but quite often the destination is off an not centered on the target.
Here is my complete setup, maybe I did something wrong.
At first I was on Cinemachine 2.9.7 then I switch to 3.0.1 but the issue persisted.
My configuration is quite simple, the target is empty because it’s added when the player spawn (start Host - multiplayer setup)

  • The view is top down Diablo like
  • My game map is shaped like a T where the player spawn at the bottom of the T.
  • When going up the T, I have a script which increase the “Follow Offset”, to just see further and further. It’s based on the z position of the character.
  • Everything works perfectly but at the top of the T, if I switch the follow target to show another player (when the main player dies for example, as a spectator camera). The camera switch automatically on the other player but half the time, the camera is completely offset. It follows but sometime we cannot even see the follow target.
  • Then even if I reset the main player back to the base of the T and switch back the follow to him, sometime it’s also offseted by quite a lot rendering it impossible to use.

I hope my explanation where clear enough :smile:,
Thank you in advance for some help :slight_smile:
I also tried a multi camera setup but that was not that great to use with player spawning and despawning of the network. I also tried the Target Group but same result. In my mind just changing the Tracking / Follow target should do the trick, I must have missed something ?

I don’t 100% understand the setup. A picture would help.

Probably it’s because of your Binding Mode. Why Lock To Target on Assign? Why not World Space? The “Lock To Target” group will interpret the camera offset in target-local space, so if the player is turned, the camera will be somewhere else. Since you have no Rotation behaviour there is nothing telling the camera to rotate and look at the target.

I’ve spent so many hours trying to fix it. Maybe the only option I didn’t try was the world Space haha.
It worked just perfectly. I went and also check a tutorial on the meaning of “Lock To X". Now I understand why you talk about rotation and why it was not working before.
Thank you very much for pointing me in the right direction :slight_smile:
Cinemachine 3 is just a breath of fresh air on the visual side of things, it’s cleeaaaan. Amazing team job :slight_smile: