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. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Framing transposer sliding bug

Discussion in 'Cinemachine' started by VeliVee, Nov 6, 2018.

  1. VeliVee

    VeliVee

    Joined:
    May 23, 2018
    Posts:
    3

    When you have two objects in a target group and a framing transposer following that group, the behavior seems weird. The yellow dot just slides to the edge of the dead zone and one of the followed targets goes off screen.

    The expected behavior is for the framing transponser to put both objects in the dead zone and stop moving.

    I've attached a UnityPackage with the example scene that shows the bug. Just hit play and see how it behaves.

    Is this a bug or am I missing some setting?
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,731
    It's behaving as designed. The dead zone is for the group center only.
     
  3. VeliVee

    VeliVee

    Joined:
    May 23, 2018
    Posts:
    3
    Thanks for the reply.

    What about the sliding though? The group center slides outside of the dead zone.

    Also, if it's not about the dead zone, shouldn't the framing transposer keep both objects in view? This is the designed behavior? As you can see from the video and the example (with nothing but cinemachine installed), it's not really behaving like this.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,731
    What the framing transposer does is to first move the camera laterally so that the center point is in the dead zone, then it moves the camera in depth so that the total screen size of the group fits the requirement. This second step can cause the center point to drift out of the dead zone, if it's far enough away from screen center.

    We agree, it's not ideal. It might be fun to make a new version of the framing transposer that handles groups a little more intuitively, fitting their bounding shape to the screen guides, instead of the center point. In the meantime, it's probably a good idea to keep that dead zone pretty small.
     
  5. VeliVee

    VeliVee

    Joined:
    May 23, 2018
    Posts:
    3
    Thanks for the reply.

    In the example scene, the starting point is a situation where the group center is within the dead zone and both objects are in frame. The starting position is what the cinemachine scripts produce and seems to work perfectly in the editor mode. It frames the group and doesn't move around. But as soon as you hit play, the camera starts sliding.

    Is there a way to have the editor behavior also in the play mode?
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,731
    So yes, the Framing transposer does not handle dead zones properly if the target is a group. We were not aware of this issue before, thanks for bringing it to our attention.

    The drift will go away if you set the dead zone width and height to zero.

    We're about to release CM 2.2.8, which includes legacy group composition modes in the framing transposer. These modes don't suffer from this issue, so you should be able to use them and get the behaviour you're looking for.

    We will add this issue to our list of things to fix in upcoming CM releases. Thanks again for reporting!