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...


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

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

Property Documentation

◆ fieldOfView

float AC.GameCameraData.fieldOfView

The camera's field of view

◆ focalDistance

float AC.GameCameraData.focalDistance

The camera's focal distance

◆ is2D

bool AC.GameCameraData.is2D

If True, the camera is 2D

◆ isOrthographic

bool AC.GameCameraData.isOrthographic

Whether the camera is orthographic or not

◆ orthographicSize

float AC.GameCameraData.orthographicSize

The camera's orthographic size

◆ perspectiveOffset

Vector2 AC.GameCameraData.perspectiveOffset

The camera's perspective offset, if is2D = True

◆ position

Vector3 AC.GameCameraData.position

The camera position

◆ rotation

Quaternion AC.GameCameraData.rotation

The camera rotation