Change virtual camera's follow target via script

Hi,

I want to change the follow target of my virtual cam to a different game object via script while game in progress.

I managed to reference the whateverCinemachineVirtualCamera.Follow = whateverGameobject.transform, but it doesn’t seem enough to make it work (reference changed but camera is not following at all).

What else is needed to make the virtual camera to work? Much appreciated.

Sorry it was actually following the object…

There’s an example script in the demo scenes - check here - it has example of how to switch follow objects. Let me know if that’s not working for you

1 Like

Doesn’t exist any more?

@aphixe You need to import it into your project:

3632605--296119--upload_2018-9-2_18-59-17.png

1 Like

Doesnt exist any more?

Now it’s in the Package Manager:

1 Like