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

Doc Home > Camera > States

Camera States allow you to specify various Camera Controller properties without having to script the changes by hand. This allows for flexibility in that you can change any of the Camera Controller properties at runtime just by specifying which state should play. Both the Ability system and the Item system has access to camera states so you can for example restrict the yaw angle while in cover or switch to a scope for a sniper rifle.

After the Camera Controller has been added to a scene it will contain two states: Default and Zoom. The Zoom state is (optionally) activated by the Camera Handler when the camera should zoom.

New camera states can be added by clicking on the plus button on the bottom right of the state list. When a new state is created you have the option of selecting which Camera Controller properties are affected by the Camera State. For example, if you wanted to create a new state which just changes the camera's offset then you'd enable "Apply Camaera Offset" and change the offset to your desired value.

At the very top of the Camera State inspector is an option to set the state to "Exclusive". An exclusive state means that no other states can override the current state until that state is finished. This is useful in the case of a sniper rifle scope. Lets say that the Zoom state has a field of view of 40, but with a sniper you want it to be 20. The Camera Handler component isn't aware that the sniper is equipped so it will try to switch to the Zoom state when the character is aiming. However, the Sniper Rifle's camera state specifies a field of view of 20 so it should be exclusive so it does not get overridden by the Zoom state.

Is the camera state exclusive of all of the other states?

View Mode
Specifies if the camera should use a Third Person, RPG, Top Down, or 2.5D (Pseudo3D) view mode

Min Pitch Limit
The minimum pitch angle (in degrees)

Max Pitch Limit
The maximum pitch angle (in degrees)

Min Yaw Limit
The minimum yaw angle while in cover (in degrees)

Max Yaw Limit
The maximum yaw angle while in cover (in degrees)

Ignore Layer Mask Move Smoothing
Ignore the specified layers when determining if the camera view is being obstructed

Camera Offset
The offset between the anchor and the location of the camera

Smart Pivot
If the camera collides with the ground should a smart pivot be applied?

Field Of View
The camera field of view

Field Of View Speed
The speed at which the FOV transitions field of views

Turn Smoothing
The amount of smoothing to apply to the pitch and yaw. Can be zero

Turn Speed
The speed at which the camera turns

Rotation Speed
The rotation speed when not using the third person view

View Distance
The distance to position the camera away from the anchor when not in third person view

Look Direction
The number of degrees to adjust if the anchor is obstructed by an object when not in third person view

Step Zoom Sensitivity
The sensitivity of the step zoom

Min Step Zoom
The minimum amount that the camera can step zoom

Max Step Zoom
The maximum amount that the camera can step zoom

Collision Radius
The radius of the camera's collision sphere to prevent it from clipping with other objects

Fade Character
Fade the character's material when the camera gets too close to the character. This will prevent the camera from clipping with the character

Start Fade Distance
The distance that the character starts to fade

End Fade Distance
The distance that the character is completely invisible

Use Target Lock
Should the crosshairs lock onto enemies?

Target Lock Speed
If target lock is enabled, specifies how quickly to move to the target (0 - 1)

Break Force
If target lock is enabled, specifies how much force is required to break the lock

Use Humanoid Target Lock
If target lock is enabled and the target is a humanoid, should the target lock onto a specific bone?

Humanoid Target Lock Bone
If target lock is enabled and the target is a humanoid, specifies which bone to lock onto

Recoil Spring
The speed at which the recoil increases when the weapon is initially fired

Recoil Dampening
The speed at which the recoil decreases after the recoil has hit its peak and is settling back to its original value

Obstruction Check
Should the camera perform an obstruction check?

Static Height
Should the y-position be a static value?

Vertical Offset
The amount of vertical offset to apply

<- Character Fade
Target Lock ->