Adventure Creator  1.74.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2019
AC.GameCameraData Class Reference

Public Member Functions

 GameCameraData ()
 
 GameCameraData (MainCamera mainCamera)
 
 GameCameraData (_Camera _camera)
 
GameCameraData CreateMix (GameCameraData otherData, float otherDataWeight, bool slerpRotation=false)
 Creates a new class that mixes its values with another class More...
 

Properties

Vector3 position [get]
 
Quaternion rotation [get]
 
bool isOrthographic [get]
 
float fieldOfView [get]
 
float orthographicSize [get]
 
float focalDistance [get]
 
bool is2D [get]
 
Vector2 perspectiveOffset [get]
 

Detailed Description

This is a container class for the MainCamera's active camera data. This is used to determine the MainCamera's transform and camera data, based on both the active camera, and the transition from the previous camera.

Constructor & Destructor Documentation

◆ GameCameraData() [1/3]

AC.GameCameraData.GameCameraData ( )

The default Constructor

◆ GameCameraData() [2/3]

AC.GameCameraData.GameCameraData ( MainCamera  mainCamera)

A Constructor that generates data based on the MainCamera's current state

◆ GameCameraData() [3/3]

AC.GameCameraData.GameCameraData ( _Camera  _camera)

A Constructor that generates data based on a _Camera's current state

Member Function Documentation

◆ CreateMix()

GameCameraData AC.GameCameraData.CreateMix ( GameCameraData  otherData,
float  otherDataWeight,
bool  slerpRotation = false 
)

Creates a new class that mixes its values with another class

Parameters
otherDataThe other data to mix with
otherDataWeightThe blending weight of the other data
slerpRotationIf True, rotation is Slerped, not Lerped
Returns
The mixed class

Property Documentation

◆ fieldOfView

float AC.GameCameraData.fieldOfView
get

The camera's field of view

◆ focalDistance

float AC.GameCameraData.focalDistance
get

The camera's focal distance

◆ is2D

bool AC.GameCameraData.is2D
get

If True, the camera is 2D

◆ isOrthographic

bool AC.GameCameraData.isOrthographic
get

Whether the camera is orthographic or not

◆ orthographicSize

float AC.GameCameraData.orthographicSize
get

The camera's orthographic size

◆ perspectiveOffset

Vector2 AC.GameCameraData.perspectiveOffset
get

The camera's perspective offset, if is2D = True

◆ position

Vector3 AC.GameCameraData.position
get

The camera position

◆ rotation

Quaternion AC.GameCameraData.rotation
get

The camera rotation