Phantom Cameras

How to configure and use GS_PhantomCameraComponent — priority, targets, data fields, and the available camera behavior types.

Phantom Cameras are virtual camera definitions placed in the level as components on ordinary entities. They do not render anything. Instead, each Phantom Camera holds a configuration record that describes how the real camera should behave when that Phantom Camera is dominant. The Cam Manager determines dominance by comparing priority values — whichever active Phantom Camera holds the highest priority drives the real camera at any given moment.

For architecture details, component properties, and extending the system in C++, see the Framework API reference.

Phantom Camera component in the O3DE Inspector

 

Contents


How Priority Works

Every GS_PhantomCameraComponent has a priority value. The Cam Manager continuously tracks all active Phantom Cameras and routes camera control to the one with the highest priority. When a Phantom Camera is disabled or deactivated, the next-highest priority camera takes over.

ConditionResult
Camera A priority 10, Camera B priority 5 — both activeCamera A is dominant.
Camera A deactivatesCamera B becomes dominant immediately (or blends if a Blend Profile is set).
Camera A and Camera B both priority 10The most recently activated one is dominant.
No Phantom Cameras are activeThe real camera holds its last known position.

PhantomCamData Fields

Each Phantom Camera stores a PhantomCamData record that defines the full camera configuration for when that camera is dominant.

FieldTypePurpose
FOVfloatField of view in degrees. Applied to the real camera’s FOV when dominant.
NearClipfloatNear clip plane distance.
FarClipfloatFar clip plane distance.
FollowTargetEntityIdEntity the camera’s position tracks. Camera moves with this entity.
LookAtTargetEntityIdEntity the camera’s rotation aims at. Overrides authored rotation.
PositionOffsetVector3Positional offset applied relative to the follow target.
RotationOffsetQuaternionRotational offset applied after look-at or authored rotation.

FollowTarget and LookAtTarget are both optional. A Phantom Camera with neither set holds the position and rotation of its entity in the level.


Camera Behavior Types

Beyond the base GS_PhantomCameraComponent, several behavior components can be added to a Phantom Camera entity to specialize how it moves and aims:

ComponentWhat It Does
ClampedLook_PhantomCamComponentAdds yaw and pitch angle limits to look-at rotation. Prevents the camera from swinging past defined bounds.
StaticOrbitPhantomCamComponentLocks the camera to a fixed orbit radius around its target entity. The orbit position does not follow input — it is a fixed authored angle.
Track_PhantomCamComponentMoves the camera along a spline path. Useful for cinematic dolly shots or scripted flythrough sequences.
AlwaysFaceCameraComponentMakes the entity that holds this component always rotate to face the currently dominant Phantom Camera. Used for billboards and 2D sprites in 3D space.

Each behavior component is additive — the base Phantom Camera still drives priority and targeting while the behavior component modifies position or rotation evaluation.


Activating and Deactivating Cameras

Phantom Cameras participate in priority competition only while their entity is active. Enable and disable the entity to add or remove a camera from competition. The transition between dominant cameras is governed by the Blend Profile referenced in the outgoing camera’s blend settings.

ScriptCanvas

To raise a camera’s priority and make it dominant:

Because priority is numeric, you can also activate multiple cameras simultaneously and let priority values determine dominance without manually disabling others.


Requesting Camera Data

Use PhantomCameraRequestBus (addressed by the Phantom Camera entity’s ID) to read or write its configuration at runtime:

ScriptCanvas


Quick Reference

NeedBusMethod / Event
Read a camera’s full configurationPhantomCameraRequestBus(id)GetPhantomCamData
Change a camera’s follow targetPhantomCameraRequestBus(id)SetFollowTarget(entityId)
Change a camera’s look-at targetPhantomCameraRequestBus(id)SetLookAtTarget(entityId)
Change a camera’s FOVPhantomCameraRequestBus(id)SetFOV(value)
Make a camera dominant(entity activation)Enable the Phantom Camera entity
Remove a camera from competition(entity activation)Disable the Phantom Camera entity
Know when the dominant camera changesCamManagerNotificationBusSettingNewCam(newCamEntityId)

Glossary

TermMeaning
Phantom CameraA virtual camera definition that describes how the real camera should behave when dominant
PhantomCamDataThe configuration record holding FOV, clip planes, follow/look-at targets, and offsets
PriorityA numeric value that determines which Phantom Camera drives the real camera
Follow TargetAn entity whose position the camera tracks
Look-At TargetAn entity the camera’s rotation aims toward

For full definitions, see the Glossary.


See Also

For the full API, component properties, and C++ extension guide:

For related systems:


Get GS_PhantomCam

GS_PhantomCam — Explore this gem on the product page and add it to your project.