Skip to content

Camera reference

The camera component on both pawns, and the camera director that picks the rigs.

How to read these tables

Settings are the values you tune: select the component in your pawn Blueprint (or open the asset) and look in the Details panel under the category shown. Runtime state is written by the system while it runs; read it, do not set it. Functions marked pure have no execution pins. The descriptions are the same as the Details panel tooltips. Default is the class default; where a sample pawn sets a different value on its component, the description says so ().

AC_CameraSystem

/GASPALS/Systems/CameraSystem/AC_CameraSystem · parent ActorComponent

Settings

Camera > FirstPerson

Variable Type Default Description
Enable First Person Rendering
bEnableFirstPersonRendering
Boolean true Setting: allows first-person primitive rendering for this pawn when the camera is in first person.

Camera > FixedCamera

Variable Type Default Description
Fixed Camera Mouse Aim Type
FixedCameraMouseAimType
E_FixedCameraMouseAimType MouseTraceWithPositionFallback Setting: how the mouse aim rotation is derived in the fixed cameras (top-down, side-scroller), from the world point under the cursor or left unchanged.

Camera > General

Variable Type Default Description
Camera Perspective
CameraPerspective
E_CameraPerspective ThirdPerson Active camera mode: third person, first person, or one of the two fixed cameras (top-down, side-scroller). Sent to the server on change. (replicated)
Camera Style
CameraStyle
E_CameraStyle Style_2 Camera style enum, changed at runtime through the DDCVar.CameraStyle console variable.
Is Camera Right Shoulder
bIsCameraRightShoulder
Boolean false True when the third-person camera sits over the right shoulder. Toggled by the switch-shoulder input.

Camera > Ragdoll

Variable Type Default Description
Allow Camera Control During Ragdoll
bAllowCameraControlDuringRagdoll
Boolean false Setting: when true the player can still look around while ragdolling.
Change Perspective During Ragdoll
bChangePerspectiveDuringRagdoll
Boolean true Setting: when true the camera switches to CameraPerspectiveDuringRagdoll while ragdolling and back afterwards.
Camera Perspective During Ragdoll
CameraPerspectiveDuringRagdoll
E_CameraPerspective TopDown Setting: perspective used while ragdolling. Only applies if bChangePerspectiveDuringRagdoll is true.
Runtime state (3 variables)
Variable Type Default Description
Crosshair Widget
CrosshairWidget
W_Crosshair ref Crosshair widget created on the local player's screen. Removed when the pawn is destroyed.
Parent Mesh FP
ParentMeshFP
SkeletalMeshComponent ref First-person mesh. In first person the camera attaches to its VB Camera virtual bone.
Player Controller
PlayerController
PlayerController ref Player controller of the owning pawn, used for crosshair and cursor aim.

Functions

Function Inputs Outputs Description
GetCrosshairAim (pure)   AimOrigin (Vector), AimDirection (Vector), AimPoint (Vector), bAimHit (Boolean), AimPlanarDirection (Vector) Where the player aims, for the crosshair and cover targeting. Third/first person: the camera ray through the screen center. Top-down/side-scroller: the ray under the mouse cursor, or with a gamepad a point 3 m out along the stick aim. Returns the ray, the world point it hits (bAimHit) and a planar aim direction.
GetFixedCameraAimRotation LookGamepad (Vector2D), LookMouse (Vector2D) AimRotation (Rotator) Updates and returns the aim rotation for the fixed cameras: from the gamepad stick when it moves, else from the mouse cursor. Also sets bCrosshairGamepadAim.
UpdateCrosshair     Local player only, called every tick. Moves the crosshair dot to the current aim point (GetCrosshairAim) and turns it green while a cover target is aimed (UpdateCoverTargetMarker on the pawn's cover component).
OnRagdollEnded     Called when the ragdoll ends. Restores camera control and the perspective saved before the ragdoll.
OnRagdollStarted     Called when the ragdoll starts. Applies the ragdoll camera control setting and optionally switches perspective.
InitializeSystem ParentPawn (Pawn ref), ParentMesh (SkeletalMeshComponent ref), ParentMesh_FP (SkeletalMeshComponent ref), GameplayCamera (GameplayCameraComponent ref)   Stores the pawn, mesh and camera references, attaches the camera for the current perspective, and binds the ragdoll camera events if enabled.

Events

  • OnCameraPerspectiveChanged (event dispatcher, NewCameraPerspective (E_CameraPerspective)): Dispatcher called when the camera perspective changes. Passes the new perspective.
  • Server_SetCameraPerspective: Server RPC, reliable.

CameraDirector_SandboxCharacter

/GASPALS/Systems/CameraSystem/CameraDirector_SandboxCharacter · parent BlueprintCameraDirectorEvaluator

Settings

Variable Type Default Description
Cover Low Camera
bCoverLowCamera
Boolean false True while the camera should use the low-cover offset rig (character behind low cover). Set each frame from the cover system.
Cover Edge Side
CoverEdgeSide
Float 0 Cover camera edge side: below -0.5 means the left edge, above 0.5 the right edge, otherwise none. Picks the edge offset rig.
Runtime state (1 variables)
Variable Type Default Description
Character Properties for Camera
CharacterPropertiesForCamera
S_CharacterPropertiesForCamera Per-frame snapshot of character state (perspective, stance, camera side) read from the pawn. Input for the CHT_CameraRig chooser.

Functions

Function Inputs Outputs Description
ActivateFirstPersonScaleRig     In first person, activates CameraRig_FP_Scale when the first-person rendering uses the Split mode (scaled arms and weapon).

W_Crosshair

/GASPALS/Systems/CameraSystem/W_Crosshair · parent UserWidget

Functions

Function Inputs Outputs Description
SetCoverTargeted bTargeted (Boolean)   Tints the crosshair dot green while a cover target is aimed, white otherwise.