Search Unity

Question Camera zoom changing when it shouldn't be?

Discussion in 'Cinemachine' started by lemmons, Jan 1, 2023.

  1. lemmons

    lemmons

    Joined:
    Jun 20, 2016
    Posts:
    68
    Like usual, this is probably user error.

    I'm using a virtual camera prefab following a target group for each group of units in my game so I'm sure it's the exact same camera for each group, but when I swap between groups if they're far away on the z-axis sometimes it zooms in. I'd love for it to not do that and just move to where it's supposed to be.

    Here's a video of what I'm seeing. You're probably familiar but I believe the white rectangle is the FOV of the virtual camera? When I swap to the group farthest away on the z axis, the FOV shrinks. Here's a screenshot of my vcam settings, its the same for every group but the Follow target is a different target group. Those are also all set up to be identical in terms of settings.

    CleanShot 2023-01-01 at 16.07.20@2x.png

    As always, any guidance is appreciated! Thank you in advance.
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    On your Framing Transposer there is a section for Group Framing (since your Follow target is a Target Group). In your image, your Adjustment Mode is Zoom only. The minimum and maximum FOV controls the range of the zoom amount possible based on the size of the Target Group. You can set both minimum and maximum FOV the value you like, for example to 40. This would practically disable the Group Framing.
    GroupFraming.png

    You can also change the Adjustment Mode to Dolly Only; this will only move the camera, it won't change the FOV.

    https://docs.unity3d.com/Packages/c.../manual/CinemachineBodyFramingTransposer.html
     
    Last edited: Jan 2, 2023
    Gregoryl and lemmons like this.
  3. lemmons

    lemmons

    Joined:
    Jun 20, 2016
    Posts:
    68
    Ohhh ok that makes sense—turns out the setting I'm actually looking for is `Dolly Then Zoom`. Thanks for pointing that out!
     
    Gregoryl and gaborkb like this.