PhantomCam
Giving deep control over your cameras.
Overview
The Phantom Cam system is a dynamic camera solution that uses camera placeholders, “Phantoms” to represent dozens or hundreds of cameras.
Through a priority system, the top phantom camera at any given time becomes the camera whos settings are what the actual play camera mimics.
Using definitions for blending, the transitions between dominant cameras can be instantaneous or do all sorts of blend easing over all sorts of different timing.
Set Up
Refer to the PhantomCam Set Up Guide in Get Started section.
Features
1 - Cam Manager

Image showing the Cam Manager component, as seen in the Entity Inspector.
Cam Manager Overview
Functionality
Setting Up Your Cam Manager
For initial startup instructions refer to the PhantomCam Set Up Guide in Get Started section.
API
// CamManagerOutgoingEventBus
void OnStartupComplete() override;
void OnEnterStandby() override;
void OnExitStandby() override;
// CamManagerIncomingEventBus
void RegisterPhantomCam(AZ::EntityId cam) override;
void UnRegisterPhantomCam(AZ::EntityId cam) override;
void ChangeCameraPriority(AZ::EntityId cam, AZ::u32 priority) override;
void AddCameraInfluence(AZStd::string camName, float influence) override;
void RemoveCameraInfluence(AZStd::string camName, float influence) override;
void SetTarget(AZ::EntityId targetEntity) override;
AZ::EntityId GetTarget() override { return camTarget; };
// Local Method
virtual void EvaluatePriority();
Extending Cam Manager
2 - Cam Core

Image showing the Cam Core component, as seen in the Entity Inspector on the MainCamera entity.
Cam Core Overview
The Cam Core is a central pillar to the Phantom Cam system, it is housed on the MainCamera and drives the processes that blend and match it’s properties to the dominant Phantom Cam.
Functionality
When cameras activate, spawn, or change their priority, the Camera Manager sorts through and determines the dominant camera. It then broadcasts that change for the Camera Core to follow.
Using the Blend Profile set to the Cam Core, the Camera will find the most valid blend to use to move towards the destination Phantom Camera. If no blend is available it falls back to defaults defined on the component.
Finally, when the camera arrives at the Phantom Cam, it becomes a child entity, and locks to the Phantom Cam, so that all movements and rotations are matched exactly.
The Cam Core, then waits until the next transition is fired.
Setting Up Your Cam Core
For initial startup instructions refer to the PhantomCam Set Up Guide in Get Started section.
Add the Cam Core component to your Main Camera. There can only be one Main Camera in the game. In order to assure that there is only one, it’s best to make the Main Camera a child of the Cam Manager, and exclude all cameras from your levels.
When your Cam Manager is created, your Cam Core follows and now is ready to interface with your Phantom Cameras.
To configure your Cam Core, edit the Cam Manager Prefab.
Set your Cam Core Defaults.
Create a Blend Profile Data Asset and add it to the CamCore Blend Profile inspector slot.
API
//CamCoreIncomingEventBus::Handler
void SetPhantomCam(AZ::EntityId targetCam) override;
AZ::EntityId GetCamCore() override { return GetEntityId(); };
Extending Cam Core
3 - Blend Profiles

Image showing the Blend Profile data asset, as seen in the Asset Editor.
Blend Profile Overview
Blend Profiles are an asset that can be created through the Asset Editor. It’s a simple file that allows the creation of any number of blends between cameras.
Using a From -> To selection format, blends between cameras can be uniquely customized even between 2 cameras, blending one way, from another.
Functionality
When you define a blend from one camera to another, you can then set a target blend time, along with a blend easing type.
There are many Easing Types, as can be seen in the Curves Utility doc.
Best Target Blend
The Blend system has layers of selection based on most specialized blend.
The first evaluation is for an exact From -> To blend.
Following that, the system checks for “Any” -> To blend definition.
Next is a From -> “Any”.
And lastly, is the fall back to default, as defined in the CamCore Component.
Creating and using a Blend Profile
For initial startup instructions refer to the PhantomCam Set Up Guide in Get Started section.
In the [ New ] menu of the Asset Editor, you can select “GS_BlendProfile”, this will create a blank Blend Profile.
Add as many Blends as you wish, using the + button.
In each blend you can set the From target camera, the To target camera, and blending details. The Camera Names are the entity names you set up on your Phantom Camera Entities.
Blank text, or “any”, indicates to the system that this is a broad, less specific target. Allowing “any” -> to cam, or From -> “any” cam blend selection.
Set the blend time you wish the blend to take to span the distance and properties between your from cam an to camera.
Due to how O3DE handles Dat assets, you may need to re-load the level, or entire editor, to get edits to the Blend Profile to propagate to the in-editor gameplay.
API
const PhantomBlend* GetBestBlend(AZStd::string fromCam, AZStd::string toCam) const;
4 - Phantom Cameras

Image showing the Phantom Camera component, as seen in the Entity Inspector.
Phantom Camera Overview
Phantom Cameras are the powerful force behind the PhantomCam system, hence its naming. Phantom Cameras represent Cameras, their states, settings, and advanced behaviour.
When a Phantom Cam takes dominance through it’s priority hitting the top of other Phantom Cameras, the MainCamera blends to it based on Blend Settings. The phantom camera itself drives complex behaviour, like orbit inputs, tracking and lookat settings, damping, screen shake, and more.
The robust library of Phantom Camera Types should be able to satisfy most Cinematic and Camera needs.
Functionality
Using Phantom Cameras
For initial startup instructions refer to the PhantomCam Set Up Guide in Get Started section.
Any number of Phantom Cameras can be created and exist in any part of the game state. They will all be connected to the system and be available for blending, priority filtration, and everything else.
To bring a particular phantom cam to become the desired camera, you can affect it or neighbouring cameras in a few ways.
- You can change the desired phantom cam priority to be above the rest of the cameras. Say priority: 100.
- You can change the neighbouring phantom cameras priority to fall below the desired phantom cam. Say reducing neighbours priority to 5, because the desired camera priority is 10.
- You can call Disable Camera on the current dominant camera. This drops it to 0 while it’s disabled. If your desired camera is the next in line, it will then take over.
- You can call Enable Camera on your desired camera, while it has a higher than the rest priority. Say your desired cam has priority 100, but is disabled, leaving it at 0. When you enable it, it’ll take priority.
Blending
API
// CamManagerOutgoingEventBus
void HandleStartup() override;
// PhantomCameraIncomingEventBus
void EnableCamera() override;
void DisableCamera() override;
void SetCameraPriority(AZ::s32 newPriority) override;
AZ::s32 GetCameraPriority() override { return priority; };
void SetCameraTarget(AZ::EntityId targetEntity) override;
void SetTargetFocusGroup(AZ::EntityId targetFocusGroup) override;
const PhantomCamData* GetCameraData() override { return &camData; };
// Local Methods
virtual void StartupCheck();
virtual void EvaluateCamTick();
//Follow
virtual void ProcessTransformFollow(AZ::Vector3& desiredPos, float deltaTime);
virtual void ProcessPhysicsFollow(float deltaTime);
virtual void ProcessFollowOffset(AZ::Vector3& destFollowPos, AZ::Transform destWorldTMFollow);
//LookAt
virtual void ProcessTransformLookAt(AZ::Quaternion& desiredRot, AZ::Transform curWorldTM, float deltaTime);
virtual void ProcessPhysicsLookAt(float deltaTime);
virtual void ProcessLookAtOffset(AZ::Vector3& destLookPos, AZ::Transform curWorldTM, AZ::Transform destWorldTMLook);
Extending Phantom Cameras
4.1 - Orbit Cam
Pending GS_PhantomCam v2 implementation.

Image showing the TargetingHandler component, as seen in the Entity Inspector.
Targeting Handler Overview
Functionality
Setting Up Your Targeting Handler
API
Extending Targeting Handler
4.2 - Static Orbit Cam
Pending We Don’t Go Into The Forest implementation.

Image showing the TargetingHandler component, as seen in the Entity Inspector.
Targeting Handler Overview
Functionality
Setting Up Your Targeting Handler
API
Extending Targeting Handler
4.3 - First Person Cam
Pending GS_PhantomCam v2 implementation.

Image showing the TargetingHandler component, as seen in the Entity Inspector.
Targeting Handler Overview
Functionality
Setting Up Your Targeting Handler
API
Extending Targeting Handler
5 - Cam Influence Fields
Pending We Don’t Go Into The Forest implementation.

Image showing a Camera Influence Field component, as seen in the Entity Inspector.
Camera Influence Fields Overview
Functionality
Using Camera Influence Fields
API
Extending Camera Influence Fields