Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.GameCamera Class Reference
Inheritance diagram for AC.GameCamera:
AC.CursorInfluenceCamera AC._Camera

Public Member Functions

override void _Update ()
 
override void SwitchTarget (Transform _target)
 Switches the camera's target. More...
 
override void MoveCameraInstant ()
 
- Public Member Functions inherited from AC.CursorInfluenceCamera
override Vector2 CreateRotationOffset ()
 Returns a vector by which to tweak the camera's rotation. The x-axis will control the spin, and the y-axis will control the pitch. More...
 
void ShowCursorInfluenceGUI ()
 
- Public Member Functions inherited from AC._Camera
virtual bool Is2D ()
 Checks if the camera is for 2D games. This is necessary for working out if the MainCamera needs to change its projection matrix. More...
 
virtual void ResetTarget ()
 
void SetSplitScreen ()
 
void RemoveSplitScreen ()
 
virtual Vector2 GetPerspectiveOffset ()
 Gets the actual horizontal and vertical panning offsets. More...
 
bool IsActive ()
 Checks if the Camera is currently the MainCamera's active camera (attachedCamera) More...
 

Public Attributes

bool actFromDefaultPlayerStart = true
 
bool lockXLocAxis = true
 
bool lockYLocAxis = true
 
bool lockZLocAxis = true
 
bool lockXRotAxis = true
 
bool lockYRotAxis = true
 
bool lockFOV = true
 
CameraLocConstrainType xLocConstrainType
 
CameraLocConstrainType yLocConstrainType = CameraLocConstrainType.TargetHeight
 
CameraLocConstrainType zLocConstrainType
 
CameraLocConstrainType xRotConstrainType = CameraLocConstrainType.TargetHeight
 
CameraRotConstrainType yRotConstrainType
 
float xGradient = 1f
 
float yGradientLoc = 1f
 
float zGradient = 1f
 
float xGradientRot = 2f
 
float yGradient = 2f
 
float FOVGradient = 2f
 
float xOffset = 0f
 
float yOffsetLoc = 0f
 
float zOffset = 0f
 
float xOffsetRot = 0f
 
float yOffset = 0f
 
float FOVOffset = 0f
 
float xFreedom = 2f
 
float yFreedom = 2f
 
float zFreedom = 2f
 
bool limitX
 
bool limitYLoc
 
bool limitZ
 
bool limitXRot
 
bool limitY
 
bool limitFOV
 
float targetHeight
 
float targetXOffset
 
float targetZOffset
 
Vector2 constrainX
 
Vector2 constrainYLoc
 
Vector2 constrainZ
 
Vector2 constrainXRot
 
Vector2 constrainY
 
Vector2 constrainFOV
 
float directionInfluence = 0f
 
float dampSpeed = 0.9f
 
bool focalPointIsTarget = false
 
- Public Attributes inherited from AC.CursorInfluenceCamera
bool followCursor = false
 
Vector2 cursorInfluence = new Vector2 (0.3f, 0.1f)
 
bool constrainCursorInfluenceX = false
 
Vector2 limitCursorInfluenceX
 
bool constrainCursorInfluenceY = false
 
Vector2 limitCursorInfluenceY
 
float followCursorSpeed = 3f
 
- Public Attributes inherited from AC._Camera
bool targetIsPlayer = true
 
Transform target
 
bool isDragControlled = false
 
float focalDistance = 10f
 

Protected Member Functions

override void Awake ()
 
override void Start ()
 
- Protected Member Functions inherited from AC._Camera
Vector3 PositionRelativeToCamera (Vector3 _position)
 
Vector3 RightVector ()
 
Vector3 ForwardVector ()
 
float ConstrainAxis (float desired, Vector2 range)
 
void MakeActive ()
 

Additional Inherited Members

- Protected Attributes inherited from AC._Camera
Vector2 inputMovement
 
- Properties inherited from AC._Camera
bool isFor2D [get, set]
 
Vector3 TargetForward [get]
 
Transform Target [get]
 
Camera Camera [get]
 

Detailed Description

The standard camera used in 3D games.

Member Function Documentation

◆ _Update()

override void AC.GameCamera._Update ( )
virtual

Updates the camera. This is called every frame by StateHandler.

Reimplemented from AC._Camera.

◆ MoveCameraInstant()

override void AC.GameCamera.MoveCameraInstant ( )
virtual

Moves the camera instantly to its destination.

Reimplemented from AC._Camera.

◆ SwitchTarget()

override void AC.GameCamera.SwitchTarget ( Transform  _target)
virtual

Switches the camera's target.

Parameters
_targetThe new target

Reimplemented from AC._Camera.

Member Data Documentation

◆ actFromDefaultPlayerStart

bool AC.GameCamera.actFromDefaultPlayerStart = true

If True, then the camera's position will be relative to the scene's default PlayerStart, rather then the Player's initial position. This ensures that camera movement is the same regardless of where the Player begins in the scene

◆ constrainFOV

Vector2 AC.GameCamera.constrainFOV

The lower and upper FOV limits, if limitFOV = True

◆ constrainX

Vector2 AC.GameCamera.constrainX

The lower and upper X-axis movement limits, if limitX = True

◆ constrainXRot

Vector2 AC.GameCamera.constrainXRot

The lower and upper pitch rotation limits, if limitXRot = True

◆ constrainY

Vector2 AC.GameCamera.constrainY

The lower and upper spin rotation limits, if limitY = True

◆ constrainYLoc

Vector2 AC.GameCamera.constrainYLoc

The lower and upper Y-axis movement limits, if limitYLoc = True

◆ constrainZ

Vector2 AC.GameCamera.constrainZ

The lower and upper Z-axis movement limits, if limitZ = True

◆ dampSpeed

float AC.GameCamera.dampSpeed = 0.9f

The follow speed when tracking a target

◆ directionInfluence

float AC.GameCamera.directionInfluence = 0f

The influence that the target's facing direction has on the tracking position

◆ focalPointIsTarget

bool AC.GameCamera.focalPointIsTarget = false

If True, then focalDistance will match the distance to target

◆ FOVGradient

float AC.GameCamera.FOVGradient = 2f

The influence of the target's position on FOV, if lockFOV = True

◆ FOVOffset

float AC.GameCamera.FOVOffset = 0f

The FOV offset, if lockXLocAxis = False

◆ limitFOV

bool AC.GameCamera.limitFOV

If True, then FOV will be limited to minimum and maximum values

◆ limitX

bool AC.GameCamera.limitX

If True, then X-axis movement will be limited to minimum and maximum values

◆ limitXRot

bool AC.GameCamera.limitXRot

If True, then pitch rotation will be limited to minimum and maximum values

◆ limitY

bool AC.GameCamera.limitY

If True, then spin rotation will be limited to minimum and maximum values

◆ limitYLoc

bool AC.GameCamera.limitYLoc

If True, then Y-axis movement will be limited to minimum and maximum values

◆ limitZ

bool AC.GameCamera.limitZ

If True, then Z-axis movement will be limited to minimum and maximum values

◆ lockFOV

bool AC.GameCamera.lockFOV = true

If True, changing of the FOV is prevented

◆ lockXLocAxis

bool AC.GameCamera.lockXLocAxis = true

If True, movement in the X-axis is prevented

◆ lockXRotAxis

bool AC.GameCamera.lockXRotAxis = true

If True, pitch rotation is prevented

◆ lockYLocAxis

bool AC.GameCamera.lockYLocAxis = true

If True, movement in the Y-axis is prevented

◆ lockYRotAxis

bool AC.GameCamera.lockYRotAxis = true

If True, spin rotation is prevented

◆ lockZLocAxis

bool AC.GameCamera.lockZLocAxis = true

If True, movement in the Z-axis is prevented

◆ targetHeight

float AC.GameCamera.targetHeight

The target height offset

◆ targetXOffset

float AC.GameCamera.targetXOffset

The target positional offset in the X-axis

◆ targetZOffset

float AC.GameCamera.targetZOffset

The target positional offset in the Z-axis

◆ xFreedom

float AC.GameCamera.xFreedom = 2f

The track freedom along the X-axis, if xLocConstrainType = CameraLocConstrainType.SideScrolling

◆ xGradient

float AC.GameCamera.xGradient = 1f

The influence of the target's position on X-axis movement, if lockXLocAxis = False

◆ xGradientRot

float AC.GameCamera.xGradientRot = 2f

The influence of the target's position on pitch rotation, if lockXRotAxis = False

◆ xLocConstrainType

CameraLocConstrainType AC.GameCamera.xLocConstrainType

The constrain type on X-axis movement, if lockXLocAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)

◆ xOffset

float AC.GameCamera.xOffset = 0f

The X-axis position offset, if lockXLocAxis = False

◆ xOffsetRot

float AC.GameCamera.xOffsetRot = 0f

The pitch rotation offset, if lockXRotAxis = False

◆ xRotConstrainType

CameraLocConstrainType AC.GameCamera.xRotConstrainType = CameraLocConstrainType.TargetHeight

The constrain type on pitch rotation, if lockXRotAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)

◆ yFreedom

float AC.GameCamera.yFreedom = 2f

The track freedom along the Y-axis, if yLocConstrainType = CameraLocConstrainType.SideScrolling

◆ yGradient

float AC.GameCamera.yGradient = 2f

The influence of the target's position on spin rotation, if lockYRotAxis = False

◆ yGradientLoc

float AC.GameCamera.yGradientLoc = 1f

The influence of the target's position on Y-axis movement, if lockYLocAxis = False

◆ yLocConstrainType

CameraLocConstrainType AC.GameCamera.yLocConstrainType = CameraLocConstrainType.TargetHeight

The constrain type on Y-axis movement, if lockYLocAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)

◆ yOffset

float AC.GameCamera.yOffset = 0f

The spin rotation offset, if lockYRotAxis = False

◆ yOffsetLoc

float AC.GameCamera.yOffsetLoc = 0f

The Y-axis position offset, if lockYLocAxis = False

◆ yRotConstrainType

CameraRotConstrainType AC.GameCamera.yRotConstrainType

The constrain type on spin rotation, if lockYRotAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, LookAtTarget)

◆ zFreedom

float AC.GameCamera.zFreedom = 2f

The track freedom along the Z-axis, if zLocConstrainType = CameraLocConstrainType.SideScrolling

◆ zGradient

float AC.GameCamera.zGradient = 1f

The influence of the target's position on Z-axis movement, if lockZLocAxis = False

◆ zLocConstrainType

CameraLocConstrainType AC.GameCamera.zLocConstrainType

The constrain type on Z-axis movement, if lockZLocAxis = False (TargetX, TargetZ, TargetAcrossScreen, TargetIntoScreen, SideScrolling, TargetHeight)

◆ zOffset

float AC.GameCamera.zOffset = 0f

The Z-axis position offset, if lockZLocAxis = False