コード例 #1
0
 /// <summary>
 /// Changes the camera placement when the Model has changed.
 /// </summary>
 protected virtual void ModelTransformChanged()
 {
     if (RootGameObject != null)
     {
         var bounds = RootGameObject.CalculateBounds();
         Camera.main.FitToBounds(bounds, CameraDistanceRatio);
         CameraDistance = Camera.main.transform.position.magnitude;
         CameraPivot    = bounds.center;
         Skybox.transform.localScale = bounds.size.magnitude * SkyboxScale * Vector3.one;
         InputMultiplier             = bounds.size.magnitude * InputMultiplierRatio;
         CameraAngle = Vector2.zero;
     }
 }