So, alongisde of upgrading my current project to Unity 6 I also upgraded Cinemachine to the latest version from a very old one. Everything wen’t well, except one issue I haven’t been able to fix:
- I’m using Camera Target Group when Player is in combat to frame all actors on screen
- I’m adding/removing Targets to the target group dynamically
- In the previous version I was using there was the Framing Transposer that had both Dead Zone and Group Framing options, so this affected the active Cinemachine Camera as follows: when there were any other Targets than the Player in the target group the camera would frame everything nicely, and when there was only the player in the target group, it would still respect the Body settings like DeadZone, Screen Position X/Y, nicely blending between the two states
- In the new Version with the Position Composer and Group Framing components, the Group Framing component completely overrides any and all settings of the Position Composer, completely ignoring Dead Zone, Screen Position etc even if there’s only 1 target in the Target Group. I need it to respect the settings Position Composer when there’s only 1 target (i.e. the player) in the target group.
Now, suspecting this might unfortunetly be expected behaviour this is the solution I tried:
- Monitoring the Target Groups Targets list, and if there is more than 1 object, toggle the GroupFraming component of the active CM Cam On, otherwise toggle it off. Now while this works, it produces an ugly hick-up when the GroupFraming is activated/deactivated. Seemingly not a good solution.
The other obvious solution I see that I’d like to really avoid however because it would overcomplicate and introduce issues in my project:
- Create a separate Cm Cam with Group Framing Composer that is only activated when the Target Group has more than 1 element, otherwise a Cm Cam without Group Framing Composer is on. Like I said, I’d like to avoid this solution at all cost because it would break a lot of my current project architecture (having to basically double each Vcam/CMcam in the project)
Soo, any ideas what would be the correct approach in this situation? Is there any way to get the old behaviour back of a Camera respecting both, the Position Composer AND the Group Framing? Any replacement for the deprecated Framing Transposer?