Search Unity

Why when changing the virtual camera position it's getting crazy rotate and move out of control ?

Discussion in 'Cinemachine' started by Chocolade, Dec 2, 2018.

  1. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    933
    I have a Main Camera with the Cinemamachine Brain component.
    The current Live Camera is the Navi Camera. (Navi vcam).

    The first problem I notice is when I'm moving the mouse around the editor the virtual camera in the game window change it's rotation even if I don't change it.

    Second problem is in the scene view window the camera seems to be in world space ? The virutal camera is not even close o my character/s and if I change the virtual camera position and see the characters it's not like the characters position it seems the virtual camera position is not the same as the characters and other objects.

    I tried and changed the virtual camera position to see the character/s but the virtual camera change position or rotation on it's own all the time.

    Another problem is when I drag the virtual camera around in the scene view window on the blue green or red the camera is rotating and moving strange.

    The first screenshot is of the Main Camera and it's inspector:



    The second screenshot is of the Navi vcam and it's inspector:



    The last screenshot showing the character and it's inspector:




    I tried to use and learn the Brackeys tutorial in this video:
    He add a brain component to the main camera then create a virtual camera then he can move around the virtual camera without any problems.

    Why in my case I can't move the virtual camera around like that ?

     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Your vcams must not be parented to the main camera. Think about it: the vcam's job is to move the main camera around, if the vcam is parented to the main camera, there will be a feedback effect. You don't want that.
     
    imwundev and Chocolade like this.
  3. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    933
    Ok I understand that. So I created a new project for testing and learning.
    This time the vcams the main camera and the timeline are not parented at all.

    This is a screenshot when I click the main camera in the hierarchy. You can see the right character female position and standing on the left bottom game window:



    Now I'm clicking in the hierarchy on the Timeline gameobject and see now where is the female character position at. Why it's there inside the other character legs ?



    Now when I click on play in the timeline player it will walk and switch between the vcams fine and in the end the female character will return to it's original start position between the other character legs.

    But if I click play on the game it self the female character will start walking from it's position in the first top screenshot and in the end it will not return to it's original position but will stay in another position.

    The female character is taken from Mixamo.com site.

    So in general it's working but the whole views positions rotations seems to be much different between the Timeline player and the editor player when starting the game.
     
  4. randyleemaitland

    randyleemaitland

    Joined:
    Nov 25, 2020
    Posts:
    6
    Wow--I was going insane...
    I'm a moron...

    THANK YOU FOR THIS...
     
    Gregoryl likes this.