/// <summary>Applies <paramref name="settings"/> to <paramref name="cam"/>.</summary>
 /// <param name="cam">Camera to update.</param>
 /// <param name="settings">Settings to apply.</param>
 public static void ApplySettings(this Camera cam, CameraPositionSettings settings)
 {
     // Position
     cam.transform.position  = settings.position;
     cam.transform.rotation  = settings.rotation;
     cam.worldToCameraMatrix = settings.GetUsedWorldToCameraMatrix();
 }
示例#2
0
 public RenderData(CameraSettings camera, CameraPositionSettings position)
     : this(
         position.GetUsedWorldToCameraMatrix(),
         camera.frustum.GetUsedProjectionMatrix(),
         position.position,
         position.rotation,
         camera.frustum.fieldOfView
         )
 {
 }