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

Public Member Functions

override void _Update ()
bool IsPlaying ()
 Checks if the AnimationClip "clip" is playing. More...
void PlayClip ()
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 void SwitchTarget (Transform _target)
 Switches the camera's target. More...
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...
void MakeActive ()

Public Attributes

AnimationClip clip
bool loopClip
bool playOnStart
AnimatedCameraType animatedCameraType = AnimatedCameraType.PlayWhenActive
Paths pathToFollow
- 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
CutsceneBehaviour cutsceneBehaviour = CutsceneBehaviour.Freeze
- Public Attributes inherited from AC._Camera
bool targetIsPlayer = true
Transform target
bool isDragControlled = false
float focalDistance = 10f

Protected Member Functions

override void Start ()
void MoveCamera ()
float GetProgress ()
Vector3 GetNearestPointOnSegment (Vector3 p1, Vector3 p2)
- Protected Member Functions inherited from AC._Camera
virtual void Awake ()
virtual void OnEnable ()
virtual void OnDisable ()
Vector3 PositionRelativeToCamera (Vector3 _position)
Vector3 RightVector ()
Vector3 ForwardVector ()
float ConstrainAxis (float desired, Vector2 range, bool isAngle=false)

Protected Attributes

Animation _animation
float pathLength
- Protected Attributes inherited from AC.CursorInfluenceCamera
Vector2 actualCursorOffset
- Protected Attributes inherited from AC._Camera
Char targetChar
Camera _camera
Vector2 inputMovement
bool is2D = false

Additional Inherited Members

- Public Types inherited from AC.CursorInfluenceCamera
enum  CutsceneBehaviour { Freeze, Allow, Reset }
- Properties inherited from AC._Camera
Transform Target [get]
Transform CameraTransform [get]
Transform Transform [get]
Camera Camera [get]
bool isFor2D [get, set]
virtual TransparencySortMode TransparencySortMode [get]
Vector3 TargetForward [get]
virtual bool CursorOffsetForcesTranslation [get]

Detailed Description

A camera that plays an animation when it is made active. The animation will either play normally, or alternatively, set match its normalised time with the target's position along a Paths object - allowing for fancy camera movement as the Player moves around a scene.

Member Function Documentation

◆ _Update()

override void AC.GameCameraAnimated._Update ( )

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

Reimplemented from AC._Camera.

◆ IsPlaying()

bool AC.GameCameraAnimated.IsPlaying ( )

Checks if the AnimationClip "clip" is playing.

True if the AnimationClip "clip" is playing

◆ MoveCameraInstant()

override void AC.GameCameraAnimated.MoveCameraInstant ( )

Moves the camera instantly to its destination.

Reimplemented from AC._Camera.

◆ PlayClip()

void AC.GameCameraAnimated.PlayClip ( )

Plays the AnimationClip "clip" if animatedCameraType = AnimatedCameraType.PlayWhenActive.

Member Data Documentation

◆ animatedCameraType

AnimatedCameraType AC.GameCameraAnimated.animatedCameraType = AnimatedCameraType.PlayWhenActive

How animations are played (PlayWhenActive, SyncWithTargetMovement)

◆ clip

AnimationClip AC.GameCameraAnimated.clip

The animation to play when this camera is made active

◆ loopClip

bool AC.GameCameraAnimated.loopClip

If True, and animatedCameraType = AnimatedCameraType.PlayWhenActive, then the animation will loop

◆ pathToFollow

Paths AC.GameCameraAnimated.pathToFollow

The Paths object to sync with animation, animatedCameraType = AnimatedCameraType.SyncWithTargetMovement

◆ playOnStart

bool AC.GameCameraAnimated.playOnStart

If True, and animatedCameraType = AnimatedCameraType.PlayWhenActive, then the animation will play when the scene begins, rather than waiting for it to become active