Customize the camera¶
The camera is data: Gameplay Cameras rigs chosen by chooser tables, plus settings on the pawn's camera component. Most changes need no Blueprint work. Background: Camera system.
Where things are:
- Rigs and chooser tables:
/GASPALS/Systems/CameraSystem/Rigs(third-person rigs inThirdPerson/, first-person rigs inFirstPerson/, and so on). Double-click a rig to open it in the Camera Rig Asset editor, select a node in its graph to edit it in the Details panel, then save the rig asset. - Component settings: open the pawn Blueprint (
/GASPALS/Blueprints/SandboxCharacter_MoverorSandboxCharacter_CMC), select AC_CameraSystem in the Components panel, and use the Details panel under Camera. The full list is in the Camera reference.
Change both pawns
Each sample pawn has its own AC_CameraSystem component. When you change a component setting on one, change it on the other too, or the Mover and CMC pawns will behave differently. Rig and chooser table edits apply to both.
Check what is active
While playing, type GameplayCameras.Debug.Enable 1 in the console (`) to show the active rigs and their parameters, and GameplayCameras.Debug.Enable 0 to hide them.
Change distance, field of view or damping for everything¶
Open ThirdPerson/CameraRig_TP_Base. Its parameters (boom arm offset, camera offset, field of view, forward / lateral / vertical damping) are the shared defaults. The variants (CameraRig_TP_Close_Freecam...) override some of them: check a variant before assuming the base value applies.
The fixed cameras work the same way: TopDown/CameraRig_TopDown_Base and SideScroller/CameraRig_SideScroller_Base, with one variant per style (CameraRig_TD_1 to _4, CameraRig_SS_1 to _4).
Check: play, and compare the view in third person with the change and without it.
Change one situation¶
Each third-person situation has its own rig: CameraRig_TP_<Close|Medium|Far>_<Freecam|Strafe|Aim>. The distance is the style (Close = Style_1, Medium = Style_2, the default, Far = Style_3). The mode is Freecam while the character turns toward its movement, Strafe while it strafes, and Aim while the player aims. For example, to bring the camera closer while aiming at the medium distance, edit CameraRig_TP_Medium_Aim.
Check: play in the default style, hold aim, and compare.
Change the crouch, shoulder, cover and movement offsets¶
The offsets come from Camera Offset Rigs on each pawn's AC_CameraSystem component (category Camera > Rigs). They apply in third person only:
| Entry | Default rig | Default offset |
|---|---|---|
| Crouch Rig | CameraRig_TP_Offset_Crouch | 50 cm down |
| Right Shoulder Rig | CameraRig_TP_Offset_Right | 100 cm to the side (right shoulder) |
| Cover Low Rig | CameraRig_TP_Offset_CoverLow | 80 cm up behind low cover |
| Cover Edge Left Rig / Right | CameraRig_TP_Offset_CoverEdgeLeft / Right | 60 cm toward the open side at a wall end |
| In Air Rig | CameraRig_TP_Offset_InAir | 30 cm back, 20 cm up while jumping or falling |
| Sliding Rig | CameraRig_TP_Offset_Sliding | 30 cm down while sliding (Mover pawn) |
| Traversing Rig | CameraRig_TP_Offset_Traversing | 40 cm back while vaulting or climbing |
| Ragdoll Rig | CameraRig_TP_Offset_Ragdoll | 60 cm back, 40 cm up while ragdolling |
The offset rigs are in Rigs/ThirdPerson.
- To tweak an offset for everyone, open the rig and edit the translation of its offset node.
- To give one character different offsets, duplicate the rig, edit the copy and point that pawn's entry at it.
- To turn an offset off (for example no crouch drop), clear the entry.
- The four movement offsets (in air, sliding, traversing, ragdoll) need Pass Movement Mode to Camera on (default). Turn it off to drop all four at once.
- To turn the cover offsets off without touching the rigs, use Enable Cover Camera Offsets and Enable Cover Shoulder Switch on the cover component (Cover).
Check: play in third person and crouch (or jump, take low cover, and so on): the camera moves by the new offset.
Change the first-person field of view¶
Open FirstPerson/CameraRig_FP_Base and change its field of view. Keep its First Person node: it keeps the first-person meshes out of the third-person body's shadow. For the arm scale of the FirstPersonOverlaySplit mode, edit CameraRig_FP_Scale (or point Camera Offset Rigs > First Person Scale Rig at your own rig).
Check: play, press 1 until the camera is in first person, and compare.
Add a camera style¶
- Make the rigs for the new style: in
Rigs/ThirdPerson, duplicateCameraRig_TP_Medium_Freecam,_Strafeand_Aim, and edit the copies. - Open
/GASPALS/Systems/CameraSystem/Data/E_CameraStyleand add an enumerator at the end of the list. Save. - Open
Rigs/CHT_CameraRigs_ThirdPersonand add three rows for the new style, one per mode (Free, Strafe, Aim), each with the ThirdPerson perspective like the existing rows, pointing at your three rigs. Save. - If the style should change the fixed cameras too, add a row to
Rigs/CHT_CameraRigs_TopDownandRigs/CHT_CameraRigs_SideScroller(duplicate aCameraRig_TD_*/CameraRig_SS_*rig for it). Without these rows, the top-down and side-scroller views have no rig for the new style; the third-person table falls back toCameraRig_TP_Medium_Freecamand first person ignores the style.
The style input (2) cycles through every entry of E_CameraStyle, so it reaches the new style after Style_1. You can also start in it (Camera Style on the pawn's AC_CameraSystem) or select it with DDCvar.CameraStyle 4 (the fifth entry; the console variable counts from 0).
Check: play, press 2 until the on-screen message shows the new style, and compare the view in free movement, strafe and aim. GameplayCameras.Debug.Enable 1 shows which rig is active.
Change the start perspective or style¶
On each pawn's AC_CameraSystem component: Camera Perspective (category Camera > Perspective) and Camera Style (Camera > General). The style also follows the console variable DDCvar.CameraStyle, whose default (1, Style_2) is set in Project Settings > Engine > Data Driven CVars.
Check: play: the game starts in the chosen view.
Limit the perspectives¶
On each pawn's AC_CameraSystem component, set Allowed Perspectives (category Camera > Perspective) to the views you want, in the order 1 should cycle them (for example ThirdPerson, FirstPerson). One entry turns the perspective input off. Make sure Camera Perspective (the start view) is in the list; otherwise the camera starts in the first entry and shows a warning.
The ragdoll view (Camera Perspective During Ragdoll, ThirdPerson by default) can stay as it is: when it is not in the list (first person only, for example), the ragdoll keeps the current view, and no warning is shown while it is at its default.
For a third-person-only game you can also delete AC_FirstPersonSystem from the pawn. See Choosing the perspectives.
Check: play and press 1: only the listed views come up, in the listed order, and no warning appears.
Change the ragdoll camera¶
On each pawn's AC_CameraSystem component, category Camera > Ragdoll:
| Goal | Setting |
|---|---|
| Keep the current view during the ragdoll | Change Perspective During Ragdoll off |
| Watch the ragdoll from another view (for example top-down) | Camera Perspective During Ragdoll; the view must be in Allowed Perspectives |
| Let the player switch perspective or shoulder during the ragdoll | Allow Camera Switch on (needs Change Perspective During Ragdoll on) |
Check: play in first person and press X to ragdoll: the camera switches to the ragdoll view, and back after you get up (X or Space). See Ragdoll and interactions for the ragdoll controls.
Restyle the crosshair¶
Edit W_Crosshair, or make your own User Widget and set it as Crosshair Widget Class on each pawn's AC_CameraSystem (category Camera > Crosshair). The camera component only adds the widget to the screen and centers it on the aim point; nothing calls into it. W_Crosshair is a plain dot (its Default Color); cover targets are shown by the cover marker. To react to cover in your own crosshair, read the owning pawn's cover system each frame (IsCoverTargeted on AC_CoverSystem). To hide the crosshair, turn Show Crosshair off.
Check: play: your widget follows the aim point in every perspective.