private void Awake()
        {
            _centerPoint = VectorExtensions.FindCenter(_setObjects.ToArray());

            _center = new GameObject().transform;
            _center.SetParent(transform);
            _center.position = _centerPoint;
        }
Example #2
0
 public void Handle(CinemachineVirtualCameraBase camera, params Transform[] transforms)
 {
     if (transforms.Length <= 1)
     {
         camera.LookAt = transforms[0];
     }
     else
     {
         _pool.DisableAll();
         var centerPoint = VectorExtensions.FindCenter(transforms);
         var aimPoint    = _pool.GetAimPoint().SetAimPoint();
         aimPoint.position = centerPoint;
         camera.LookAt     = aimPoint;
     }
 }