Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Child Unity Camera Not Inheriting Cinemachine VCam Look Rotation, Need Help

Discussion in 'Cinemachine' started by UDN_60ec7ec8-dd8c-4d76-a15c-634929e3b2c4, May 9, 2019.

  1. UDN_60ec7ec8-dd8c-4d76-a15c-634929e3b2c4

    UDN_60ec7ec8-dd8c-4d76-a15c-634929e3b2c4

    Joined:
    Jun 19, 2017
    Posts:
    2
    Hi there!
    I am using a Cinemachine virtual camera to track my player object and I want to have a separate unity camera to overlay a world space UI object over the virtual camera through a culling mask(I can't figure out a way to overlay Vcams in such a way if anyone knows how please do share), the UI object is a child of the unity camera and that camera needs to have the same position and rotation of the virtual camera.

    I have the unity camera as a child of the virtual camera and It tracks the position just fine, however, it doesn't share the same look (aim?) rotation as the virtual camera, best I can gather is that the virtual camera does not actually affect the object's rotation, instead it has its own virtual rotation

    is there a way I can access this rotation and apply it to my unity camera?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Make your UI camera a child of the Unity camera with the CM brain, not a child of the vcam. Then it will work.
     
  3. UDN_60ec7ec8-dd8c-4d76-a15c-634929e3b2c4

    UDN_60ec7ec8-dd8c-4d76-a15c-634929e3b2c4

    Joined:
    Jun 19, 2017
    Posts:
    2
    Thank you! Worked perfectly!
     
    Gregoryl likes this.