Search Unity

Question Get Cinemachine camera's rotation

Discussion in 'Cinemachine' started by Ruchir, Aug 13, 2022.

  1. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    How can I get the rotation of a Cinemachine virtual camera without using the camera's rotation?
    Currently doesn't matter where the camera is aiming the rotation of Cinemachine virtual camera is always (0,0,0). So, is there a function/property I can use to get the intended camera rotation of a virtual camera?

    EDIT: I'm using the freelook camera
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    You can look at the Main Camera's rotation, or do vcam.State.FinalOrientation.
     
    Ruchir likes this.
  3. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Yeah, I was looking for this one, Thanks a lot! :)
     
    Gregoryl likes this.