Camera Influence Fields

Global and spatial camera influence components — priority modifiers that affect phantom camera selection without changing base priorities.

Camera Influence Fields modify the effective priority of Phantom Cameras without changing their base priority values. They call AddCameraInfluence / RemoveCameraInfluence on the Cam Manager bus, identified by camera name. Multiple influences on the same camera stack additively.

There are two influence component types:

  • GlobalCameraInfluenceComponent — Applies a priority influence globally for its entire active lifetime. Place this on the StageData entity so it activates and deactivates automatically with the stage.
  • CameraInfluenceFieldComponent — Applies a priority influence only when the player enters a defined spatial volume. Requires a PhysX Collider set as a trigger on the same entity. See Physics Trigger Volume Utility.

For usage guides and setup examples, see The Basics: GS_PhantomCam.

 

Contents


How It Works

Global Influence

The GlobalCameraInfluenceComponent applies a constant priority modifier to a named phantom camera. On Activate(), it calls AddCameraInfluence on the Cam Manager bus. On Deactivate(), it calls RemoveCameraInfluence.

Placement: Add this component to the StageData entity. Because StageData activates at stage load and deactivates at stage unload, the camera influence is automatically scoped to the stage that defines it — no manual enable/disable management needed.

Spatial Influence

The CameraInfluenceFieldComponent uses a PhysX Collider (trigger mode) to detect when the player enters or exits a defined region. On entry, it adds the influence; on exit, it removes it. See Physics Trigger Volume Utility for collider setup.

This is useful for level design — switching to an overhead camera when the player enters a specific room, or boosting a scenic camera in a vista area.

Influence Stacking

Multiple influences can be active on the same camera simultaneously. The Cam Manager sums all active influences with the base priority to compute the effective priority used during EvaluatePriority().


CamInfluenceData Structure

Both component types use the CamInfluenceData structure to define their effect.

FieldTypeDescription
CameraNameAZStd::stringEntity name of the phantom camera to influence. Must match exactly.
InfluencefloatPriority modifier. Positive values increase effective priority; negative values decrease it.

API Reference

Request Bus: GlobalCameraInfluenceRequestBus

Commands for the global camera influence system. Single address, single handler.

MethodParametersReturnsDescription
AddCameraInfluenceAZStd::string camName, float influencevoidAdds a priority influence to the named camera. Delegates to the Cam Manager.
RemoveCameraInfluenceAZStd::string camName, float influencevoidRemoves a priority influence from the named camera. Delegates to the Cam Manager.

Component Reference

GlobalCameraInfluenceComponent

Applies a camera priority influence globally for its entire active lifetime.

PropertyTypeDescription
CamInfluenceDataCamInfluenceDataThe camera name and influence value to apply.

Behavior: On Activate(), adds the influence. On Deactivate(), removes it. Constant while active.

Placement: Add to the StageData entity to scope the influence to the stage lifecycle.


CameraInfluenceFieldComponent

Applies a camera priority influence when the player enters a spatial trigger volume.

PropertyTypeDescription
CamInfluenceDataCamInfluenceDataThe camera name and influence value to apply when triggered.

Behavior: Requires a PhysX Collider (trigger) on the same entity. Entry adds the influence; exit removes it.

Setup:

  1. Add CameraInfluenceFieldComponent to an entity.
  2. Add a PhysX Collider (set as trigger) to the same entity. See Physics Trigger Volume Utility.
  3. Set the Camera Name to the target phantom camera’s entity name.
  4. Set the Influence value (positive to boost, negative to reduce priority).

Usage Examples

C++ – Adding a Global Influence

#include <GS_PhantomCam/GS_PhantomCamBus.h>

// Boost "CinematicCam" priority by 50 during a cutscene
GS_PhantomCam::CamManagerRequestBus::Broadcast(
    &GS_PhantomCam::CamManagerRequestBus::Events::AddCameraInfluence,
    AZStd::string("CinematicCam"),
    50.0f
);

// Remove the boost when the cutscene ends
GS_PhantomCam::CamManagerRequestBus::Broadcast(
    &GS_PhantomCam::CamManagerRequestBus::Events::RemoveCameraInfluence,
    AZStd::string("CinematicCam"),
    50.0f
);

See Also

For related PhantomCam components:

For related utilities:

For conceptual overviews and usage guides:


Get GS_PhantomCam

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