Search Unity

Unexpected Target Group Radius Behaviour since upgrading from 2.2.7/2018.4 to 2.3.3+/2019.4

Discussion in 'Cinemachine' started by AurochChris, Jun 20, 2020.

  1. AurochChris

    AurochChris

    Joined:
    Jan 7, 2014
    Posts:
    24
    *** Update: Probably user error, see comment below. ***

    Hey all,

    So I'm experiencing some issues with setting radii on target group targets after upgrading to Unity 2019/Cinemachine 2.3.3 and higher.

    I've created a scene where we use Cinemachine to frame our 3D models and Unity Recorder to capture screenshots for game icons. We use a target group to frame the top and bottom of a model, and set the radius of each target to the maximum radius of the model. You can see the results in the attached screenshot.

    Since upgrading from 2018.4.5f1 to 2019.4f1, and Cinemachine from 2.2.7 to 2.3.3+ (I've tested 2.5.0 and 2.6.0 as well) my results with the same model and Cinemachine setup is wildly different. I've tracked this down to the radius values - in 2.3.3+ / 2019.4 if I set these to 0, I get broadly the desired results, but as soon as the radius is a small number, the framing breaks completely. I haven't changed anything else about the scene.

    My understanding of the radii on the target group is that they represent the bounding box of a target. So a radius of 2 will essentially be a sphere 2 meters in size, and Cinemachine will try and keep the maximum extents of all target and their radii in the frame. After seeing the results in 2019, I'm not sure if I am dealing with a bug, or if I don't understand the radius property correctly?

    If anyone can point me in the right direction, that would be greatly appreciated!
     

    Attached Files:

    Last edited: Jun 21, 2020
  2. AurochChris

    AurochChris

    Joined:
    Jan 7, 2014
    Posts:
    24
    Did a little bit more digging into this over the weekend, and I think that the issue is that the VCAM setup in 2018 is actually incorrect, but somehow ended up working very well for our purposes.

    I did some more RTFM'ing and came up with a saner setup for my VCAM which at first glance seems to do what we want, and target group radius values no longer end up doing weird things.

    Will update if I run into anything strange in the future, but as of now I think we're good!
     
    Gregoryl likes this.