- Home /
How to set Body and Aim properties of Cinemachine Virual Camera via script?
I need to create Virtual Camera by script and set Body and Aim properties not by editor but I cant get access to these properties in script There is no Aim or Body property that I need to set. Please help how can I do it?
f.png
(17.0 kB)
Comment
Answer by c_jberme · Apr 14, 2020 at 06:14 PM
Its depends of the CinemachineComponentBase
that you want to add to your Virtual Camera.
CinemachineVirtualCamera cmvc = gameobject.AddComponent<CinemachineVirtualCamera>();
CinemachineTrackedDolly body = cmvc.AddCinemachineComponent<CinemachineTrackedDolly>();
CinemachinePOV aim = cmvc.AddCinemachineComponent<CinemachinePOV>();
Then you edit the properties that you requiere.
Your answer
Follow this Question
Related Questions
how to switch cameras C# 0 Answers
How to detect an object which be in FOV of certain camera ? 1 Answer
Switching from a cinematic cycle to the player camera 0 Answers
Distribute terrain in zones 3 Answers
Camera up and down on TouchField 1 Answer