Search Unity

Is there any way to set up virtual camera values with code?

Discussion in 'Cinemachine' started by Lune, Feb 7, 2018.

  1. Lune

    Lune

    Joined:
    Oct 20, 2012
    Posts:
    62
    Hello! basically I'm doing a "virtual camera prefab", i need about 20+ virtual cameras in my scenes because of reasons.. however i cant find any way to set up body transposer values using code.

    i want to set up a button to reset the offset of the body transposer to a default value in my game but i don't know how to access those values using code.
     
    Firemaw likes this.
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    vcam.GetCinemachineComponent<CinemachineTransposer>().m_FollowOffset = bla;
     
    Firemaw and Lune like this.
  3. Lune

    Lune

    Joined:
    Oct 20, 2012
    Posts:
    62
    thanks!