Search Unity

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:
    7,728
    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:
    7,728
    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:
    7,728
    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!