Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Cinemachine causing jitter in Game View in Editor

Discussion in 'Cinemachine' started by chainsawpenguin, Sep 6, 2018.

  1. chainsawpenguin

    chainsawpenguin

    Joined:
    Sep 28, 2014
    Posts:
    82
    I often have the game view open in a pane in the Editor so that I can watch both it, and, say, an animator. But with a Cinemachine camera enabled, when NOT in Gameplay mode, the Game panel just freaks the hell out. Why is it moving at all? I'm not touching the camera or its target, I'm just navigating around the editor.

    EDIT: For example, resizing the Game pane causes the camera preview to jerk around by 90 degrees, back and forth. I could just hide Game pane, but then I need to UNhide it when I'm troubleshooting... GAH!
     
    Last edited: Sep 6, 2018
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,742
    Shouldn't happen.. Which version of CM ant what kind of vcam and target?
     
  3. chainsawpenguin

    chainsawpenguin

    Joined:
    Sep 28, 2014
    Posts:
    82
    Cinemachine version [2.2.7] - according to the #Changelog

    The vcam is a Cinemachine Freelook with a Cinemachine Collider.

    The target is an empty Game Object that is a child of my main character, set to roughly the height of his head.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,742
    Does it still happen if you disable the CM collider? Can you post an image of your vcam inspector? And the hierarchy, showing the vcam, the main camera, and the target?
     
  5. chainsawpenguin

    chainsawpenguin

    Joined:
    Sep 28, 2014
    Posts:
    82
    See here:
     

    Attached Files:

  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,742
    Is the vcam looking straight down? If so, that might explain it. Vcam composers don't like to look straight up or down. Give that top orbit a little radius.
     
  7. chainsawpenguin

    chainsawpenguin

    Joined:
    Sep 28, 2014
    Posts:
    82
    Does it still happen if you disable the CM collider?

    Yes.

    Can you post an image of your vcam inspector?

    Yes. See below.

    And the hierarchy, showing the vcam, the main camera, and the target?

    I don't know how to show all three of those things at once in a single screenshot. If the image attached is insufficient... I'll work on it.
     

    Attached Files:

  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,742
    The vcams should not be parented to the main camera. That might be the cause. Take them out.
     
  9. chainsawpenguin

    chainsawpenguin

    Joined:
    Sep 28, 2014
    Posts:
    82
    They don't have to be parented to the Main Camera with the Cinemachine Brain?

    ...Trippy. Okay, that seems to have worked!
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,742
    They must not be parented to the main camera. Think of them as independent agents that, when active, reposition the main camera's transform to be the same as their own. If they are children of the main camera, then they will move when the main camera does, creating a feedback loop, which is what you were seeing.
     
  11. chainsawpenguin

    chainsawpenguin

    Joined:
    Sep 28, 2014
    Posts:
    82
    Very cool explanation, and excellent troubleshooting. Please give this nice sir a raise, Unity!