Version:

Camera Rig Component

Use the Camera Rig component to add and remove behaviors to drive your camera entity.

Provider

Camera Framework Gem

Dependencies

Entity with Camera component.

Camera Rig properties

Camera Rig properties

Target acquirers
Array of behaviors that define how the camera rig selects a target. The rig tries each acquirer in the order listed until one successfully finds a target.
Look-at behaviors
Array of behaviors that modify the look-at target transform. The rig runs each in order to generate a final target transform.
Transform behaviors
Array of behaviors that modify the camera’s transform based on the look-at target transform. The rig runs each in order before setting the camera’s transform.

Target acquirers properties

Acquire by entityId properties

PropertyDescriptionValuesDefault
Entity targetChoose an entity for the camera rig to target.EntityIdNone
Use target rotationIf enabled, the camera rig uses the target entity’s rotation when determining behavior.BooleanEnabled
Use target positionIf enabled, the camera rig uses the target entity’s position when determining behavior.BooleanEnabled

Acquire by tag properties

PropertyDescriptionValuesDefault
Target tagFind a target by tag. If multiple entities are found, the camera target’s the first entity to respond.Crc32None
Use target rotationIf enabled, the camera rig uses the target entity’s rotation when determining behavior.BooleanEnabled
Use target positionIf enabled, the camera rig uses the target entity’s position when determining behavior.BooleanEnabled

Look-at behaviors properties

Use OffsetPosition to change the position of the target’s transform. For example, you can set the camera to target a position 1.8 meters up from a character’s base.

Offset position properties

PropertyDescriptionValuesDefault
Positional OffsetVector displacement of the target transform’s position.Vector3X:0.0, Y:0.0, Z:0.0
Offset Is RelativeIf enabled, Positional Offset is in local space. If disabled, Positional Offset is in world space.BooleanDisabled

Use Rotate Camera Target to rotate the camera target separately from its source target. For example, you can set the camera to pitch on the X axis to simulate a character looking up or down.

Rotate camera target properties

PropertyDescriptionValuesDefault
Axis Of RotationThe axis of the target that the camera rotates around.X, Y, or Z axis.Camera Target's X Axis
Event NameName of Input Event that provides the value for the rotation.StringNone
Invert AxisIf enabled, inverts the Axis Of Rotation.BooleanDisabled
Rotation Speed ScaleMultiplier for Input Event values used to scale the speed of rotation.0.001 to Infinity1.0

For more information about Input Events, refer to Working with the Input component.

Use SlideAlongAxisBasedOnAngle to modify the position of the look-at target based on an angle. For example, you can set the camera to move in front of the character when the character looks down.

Slide along axis based on angle properties

PropertyDescriptionValuesDefault
Axis to slide alongThe axis to slide the camera on.Forwards and Backwards, Right and Left, Up and DownForwards and Backwards
Angle TypeThe type of rotation to base the slide on.Pitch, Roll, YawPitch
Vector Component To IgnoreChoose a vector component to ignore to limit camera movement to a single plane.None, X, Y, ZNone
Max Positive Slide DistanceThe maximum camera slide (in meters) when the angle of rotation is 90 degrees.-Infinity to Infinity0.0
Max Negative Slide DistanceThe maximum camera slide (in meters) when the angle of rotation is -90 degrees.-Infinity to Infinity0.0

Transform behaviors properties

Offset Position sets the camera’s position in relation to the target’s position.

Offset position properties

PropertyDescriptionValuesDefault
OffsetVector displacement of the target transform’s position.Vector3X:0.0, Y:0.0, Z:0.0
Is Offset RelativeIf enabled, Offset is in local space. If disabled, Offset is in world space.BooleanDisabled

FollowTargetFromDistance causes the camera to follow the target from a specified distance. You can also set Input Events to trigger the camera to zoom in on or out from a target.

Follow target from distance properties

PropertyDescriptionValuesDefault
Follow DistanceThe distance (in meters) from which the camera follows the target. Must be greater than or equal to Minimum Follow Distance and less than or equal to Maximum Follow Distance.0 to Infinity0.0
Minimum Follow DistanceMinimum distance (in meters) from which the camera follows the target. Must be less than or equal to Maximum Follow Distance.0 to Infinity0.0
Maximum Follow DistanceMaximum distance (in meters) from which the camera follows the target.0 to Infinity0.0
Zoom In Event NameInput Event name that reduces the current follow distance, in effect, zooming in.StringNone
Zoom Out Event NameInput Event name that increases the current follow distance, in effect, zooming out.StringNone
Zoom Speed ScaleMultiplier for Input Event values used to scale the speed of zooming.-Infinity to Infinity1.0

For more information about Input Events, refer to Working with the Input component.

Use Rotate to rotate a camera about one of its axes (X, Y, or Z).

Rotate properties

PropertyDescriptionValuesDefault
AngleAngle (in degrees) to rotate the camera.-Infinity to Infinity0.0
AxisAxis about which to rotate the camera.X, Y, ZX

FollowTargetFromAngle causes the camera to follow the target from a specified angle. This feature works well for top-down, isometric, and side scrolling cameras.

Follow target from angle properties

PropertyDescriptionValuesDefault
AngleAngle (in degrees) at which to follow the target.-Infinity to Infinity0.0
Rotation TypeThe rotation type of Angle.Pitch, Roll, YawPitch
Distance From TargetThe distance (in meters) from which the camera follows the target.-Infinity to Infinity1.0

FaceTarget causes the camera to change the rotation of its transform to look at the target. To use this feature, simply add it. There are no additional properties to configure.

Face target properties