Overview | Videos | Documentation | Demos | Integrations | API | Support

Doc Home > Camera

The CameraController component controls the camera’s position and rotation for a third person, top down, or 2.5D view. When the camera is in third person mode, the camera will smoothly follow the character as the character moves. If the the RigidbodyCharacterController is in combat mode, the camera will always be behind the player. When the controller is in adventure mode the camera will be able to freely rotate around the character. Top down mode will follow the character from a birds eye view. RPG mode allows the camera to interact with the mouse to decide how to position/rotate itself. 2.5D view mode places the camera in a 2.5D perspective.

When the character dies the CameraController will receive the OnDeath event. The CameraController will then either go into a death orbit mode or in a LookAt mode. The death orbit will smoothly circle around the character’s position. If the death orbit mode is disabled then the CameraController will just continue to look at the character and not change positions.

The Camera Controller uses camera states in order to determine the current properties. This allows the camera to change settings at runtime without having to manually script each change. New camera states can be triggered by abilities or items.

The character can fade out if the camera gets too close to the character, thus eliminating the chance of the camera clipping with the character. The fading will occur if FadeCharacter is enabled. In addition, the camera has the option of locking onto a target. UseTargetLock must be enabled and that will allow your character to stay focused on a particular object.

The CameraController component works with the CameraMonitor component in order to communicate to other components about the camera's current state. For example, CharacterIK uses to a SharedMethod to communicate with the camera to know which direction to aim. If you want to use your own custom camera you can assign the CameraMonitor component and everything else will continue to work.

Camera States
A list of all possible CameraStates

Init Character On Start
Should the character be initialized on start?

Character
The character that the camera is following

Anchor
The transform of the object to look at

Auto Anchor
Should the anchor be assigned automatically based on the bone?

Auto Anchor Bone
The bone in which the anchor will be assigned to if automatically assigned

Fade Transform
The Transform to use when determining how much to fade

Death Anchor
Optionally specify an anchor point to look at when the character dies. If no anchor is specified the character's position will be used

Use Death Orbit
When the character dies should the camera start rotating around the character? If false the camera will just look at the player

Death Orbit Rotation Speed
The speed at which the camera rotates when the character dies. Used by both the death orbit and regular look at

Death Orbit Move Speed
The speed at which the death orbit moves

Death Orbit Distance
How far away the camera should be orbiting the character when the character dies


<- Wrappers
Character Fade ->