Search Unity

CinemachienVirtualCamera script: get and set the PathPosition of the TrackedDolly by code

Discussion in 'Cinemachine' started by usernameHed, Mar 11, 2019.

  1. usernameHed

    usernameHed

    Joined:
    Apr 5, 2016
    Posts:
    93
    Hello ! I have a CinemachienVirtualCamera script, setup with a Tracked Dolly.

    How can I acces, via script the PathPosition and change it ?

    https://www.cjoint.com/doc/19_03/IClpZaM4v03_aaaa.PNG

    Something like:
    Code (CSharp):
    1. public CinemachineVirtualCamera mainVirtualCamera;
    2. mainVirtualCamera.body.TrackedDolly.PathPosition = 3f;
    Or something liek that

    I have searched but I found nothing... I hope this is possible :/

    Thanks you !
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    vcam.GetCinemachineComponent<CinemachineTrackedDolly>().m_PathPosition = bla;