Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Focus multiple targets with 2d cinemachine camera by increasing or decreasing ortho size only?

Discussion in 'Cinemachine' started by firsttry21, Feb 3, 2019.

  1. firsttry21

    firsttry21

    Joined:
    Oct 10, 2017
    Posts:
    34
    I would like to keep an object in the center of the viewport while targetting multiple objects with cinemachine 2d group target camera but i cant seem to find a correct configuration for that. Is there a way to do so? if so how can i achieve such behaviour?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,968
    You won't get that out of the box, without a little scripting. Here is how to do it: put a single item in the TargetGroup, and adjust its radius dynamically from your script, according to the distance to the farthest of the other target objects.
     
unityunity