Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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,241
    vcam.GetCinemachineComponent<CinemachineTransposer>().m_FollowOffset = bla;
     
    Firemaw and Lune like this.
  3. Lune

    Lune

    Joined:
    Oct 20, 2012
    Posts:
    62
    thanks!