Cinemachine lerping when the player teleports

i am using cinemachine for my player camera, however, when my player teleports, the camera lerps to the location instead of teleporting with my player. i tried teleporting the camera with the player, but that doesn’t seem to work. teleporting for a frame, then continuing the lerp as if the camera hasn’t moved.

if anyone could help, that would be greatly appreciated.

1 Like

I do not know what Camera Setup you use. I use the Position Composer with Damping that tracks a target transform. For that you need to call OnTargetObjectWarped. Every Cinemachine Component has this method. So it may work even if you use other components that do some sort of object tracking.

OnTargetObjectWarped(Transform, Vector3)

Just use as parameter your tracked object and the position delta from the teleport.

You should not call it on the individual components. Instead you can use CinemachineCore.OnTargetObjectWarped(). That will take care of it for all CM cameras tracking the target.