Reposition target and camera runtime - how to avoid the "popping"?

If you’re on Unity 2018, you can grab the latest CM release candidate from the package manager. In it, there is a new API call: vcam.OnTargetObjectWarped. After repositioning your target, you would call it as follows (transform is the thing that got moved):

            // Inform any vcams that might be tracking this target
            int numVcams = CinemachineCore.Instance.VirtualCameraCount;
            for (int i = 0; i < numVcams; ++i)
                CinemachineCore.Instance.GetVirtualCamera(i).OnTargetObjectWarped(
                    transform, posDelta);
5 Likes