Plugin Documentation

CamForge
Data-driven third & first person camera manager

A player camera manager that picks its camera values from the state of the view target, blends every change smoothly, and adds collision, shoulder swap, target lock-on, occlusion fade, speed-based FOV and smooth zoom — in C++, with built-in defaults that work without any asset.

v1.0
UE 4.27 & 5.8
Win64 & Mac
Category Camera
Alpha XP

Overview

CamForge is a camera manager for Unreal Engine 4.27 and 5.8. It replaces the view your player sees with a complete camera rig computed every frame — no spring arm and no camera component on the pawn are needed. Camera values live in a CamForge Settings data asset and are chosen by the state of the view target; when the state changes, the camera blends to the new values.

  • Settings by view mode (third / first person), rotation mode (velocity direction, looking direction, aiming), stance (standing, crouching) and gait (walking, running, sprinting), plus named action state overrides such as Rolling or Mantling.
  • Smooth blends with a blend time per settings set and an optional easing curve.
  • Arm length, camera offset, pivot offset, per-axis pivot lag, rotation lag, field of view and pitch / yaw / roll limits per set.
  • Camera collision with instant pull-in and smooth recovery; the view target and its attachments are ignored.
  • First person at a mesh socket or eye height, with blended transitions to and from third person.
  • Shoulder swap, target lock-on, occlusion fade, speed-based FOV and smooth zoom.
  • Zero-code support for any pawn through the CamForge Target component, full control through the CamForge Target Interface.
  • Built-in defaults in C++: the plugin ships no content and works without a settings asset.

Requirements

RequirementDetails
Unreal Engine4.27 and 5.8 (verified clean on both)
ModuleCamForge (Runtime)
DependenciesNone (engine modules only; no other plugins are enabled)
ContentNone — all defaults live in C++
LanguageBlueprints and C++
PlatformsWin64 and Mac (the module lists these platforms in the plugin descriptor). The code is platform-independent engine C++ with no OS-specific calls.
NetworkingNot replicated — every player computes its own camera locally (see Networking).

Installation

  1. Install CamForge from Fab into your engine, or copy the CamForge folder into your project's Plugins folder.
  2. For a C++ project, regenerate project files and build the editor target.
  3. Open the project, enable CamForge in Edit > Plugins and restart the editor.
  4. C++ only: add PublicDependencyModuleNames.Add("CamForge"); to your Build.cs.
Verifying the installThe Player Camera Manager Class dropdown of a Player Controller lists CamForge Player Camera Manager, and the Add Component menu of a pawn lists CamForge Target.

Quick start

Blueprint

  1. Open your Player Controller Blueprint (the one set in your Game Mode). In Class Defaults set Player Camera Manager Class to CamForge Player Camera Manager.
  2. Open your pawn or character Blueprint and add the CamForge Target component. Nothing else is required: stance follows the character's crouch state and gait follows its speed.
  3. Make sure the pawn receives look input (Add Controller Yaw Input / Add Controller Pitch Input, as in the engine templates) — CamForge follows the controller's control rotation.
  4. Press Play. You get an over-the-shoulder third person camera with collision, lag and speed-based FOV. Existing camera and spring arm components on the pawn are ignored while CamForge is enabled.
  5. Bind input on the player controller or pawn, using Get CamForge Camera Manager:
    • Mouse wheel / gamepad axis → Add Zoom Input (positive zooms in)
    • Shoulder key → Swap Shoulder
    • View key → Toggle View Mode
    • Aim pressed / released → Set Rotation Mode (Aiming / Looking Direction)
    • Lock-on key → Find Best Lock On Target (with your enemy list) then Lock On To, or Clear Lock On
  6. To tune the camera: Add > Miscellaneous > Data Asset, pick CamForge Settings. Create a Blueprint child of CamForge Player Camera Manager, set its CamForge Settings to the asset and use that Blueprint as the Player Camera Manager Class (or call Set CamForge Settings at runtime). A new asset starts with the built-in defaults.

C++

// Build.cs: PublicDependencyModuleNames.Add("CamForge");
#include "CamForgePlayerCameraManager.h"
#include "CamForgeTargetComponent.h"
#include "CamForgeLibrary.h"

AMyPlayerController::AMyPlayerController()
{
    PlayerCameraManagerClass = ACamForgePlayerCameraManager::StaticClass();
}

AMyCharacter::AMyCharacter()
{
    CameraTarget = CreateDefaultSubobject<UCamForgeTargetComponent>(TEXT("CameraTarget"));
}

void AMyCharacter::OnZoom(float Value)
{
    if (ACamForgePlayerCameraManager* Camera = UCamForgeLibrary::GetCamForgeCameraManager(this, 0))
    {
        Camera->AddZoomInput(Value);
    }
}

void AMyCharacter::OnAim(bool bAiming)
{
    CameraTarget->SetRotationMode(bAiming ? ECamForgeRotationMode::Aiming : ECamForgeRotationMode::LookingDirection);
}

How a frame is computed

For the main view target, every frame the camera manager:

  1. Reads the camera state (interface → component → Default Camera State) and fires events when it changed.
  2. Resolves the settings set for that state and, when the set changed, starts a blend from the current values over the new set's Blend Time, eased by its Blend Curve (smooth step when empty).
  3. Takes the controller's control rotation and applies Rotation Lag Speed.
  4. Builds the pivot: pivot target transform + Pivot Offset (in the pivot's local space), moved toward a locked target for framing, then lagged per axis in camera-yaw space with Pivot Lag Speed. A jump larger than Teleport Distance skips the lag.
  5. Places the third person camera: Arm Length (with zoom and lock-on extra) behind the pivot along the view direction plus Camera Offset in view space, the Y offset mirrored by the shoulder side; sweeps for collision and finds occluders.
  6. Places the first person camera at the first person target plus Camera Offset.
  7. Blends third and first person locations while the view mode changes, writes location, rotation and field of view (plus the speed FOV kick) and applies the set's view rotation limits to the controller.
Camera actors and debug stylesView targets that are Camera Actors and the engine's debug camera styles (camera freecam etc.) are handled by the engine as usual; CamForge drives every other view target. Disable CamForge at runtime with Set CamForge Enabled to get the view target's own camera component back.

Camera state

FCamForgeCameraState selects the settings. It comes from the view target's interface when implemented, else its component, else the manager's Default Camera State (with automatic stance and gait when Auto Stance For Default State / Auto Gait For Default State are on).

FieldValuesDescription
View ModeThird Person, First PersonSelects the rig. First Person always uses the First Person set.
Rotation ModeVelocity Direction, Looking Direction, AimingHow the character is oriented; your character logic sets it (CamForge does not rotate the pawn).
StanceStanding, CrouchingAutomatic from the character's crouch state by default.
GaitWalking, Running, SprintingAutomatic from horizontal speed by default (Running from 300, Sprinting from 650 units/s).
Action StateAny name, NoneOptional action such as Rolling or Mantling; overrides the third person rules when listed in Action State Overrides.

Settings asset

UCamForgeSettings is a data asset (Add > Miscellaneous > Data Asset > CamForge Settings). Assign it to CamForge Settings on the camera manager; without an asset the class defaults are used.

How the set is chosen

SituationSet used
View Mode = First PersonFirst Person
Third person, Action State listed in Action State OverridesThat override
Third person, one or more Third Person Rules matchThe rule with the most enabled conditions (rotation mode, stance, gait); ties go to the earlier rule
Third person, nothing matchesThird Person

Built-in rules (in order): Aiming Crouched, Aiming, Crouching, Sprinting, Running, Looking Direction. Built-in action states: Rolling, Mantling. Resolve Camera Settings and Resolve Settings Name preview what a state resolves to.

Camera settings set (FCamForgeCameraSettings)

SettingDefaultDescription
Arm Length300Distance behind the pivot along the view direction. In first person it pulls the camera back from the eyes (default 0).
Camera Offset(0, 30, 0)View-space offset: X forward, Y right, Z up. Third person Y is mirrored by the shoulder (Left = −Y, Center = 0).
Pivot Offset(0, 0, 40)Offset from the pivot target in its local space (third person).
Pivot Lag Speed(15, 15, 10)Per-axis lag in camera-yaw space (X forward/back, Y sideways, Z up/down). 0 = no lag on that axis.
Rotation Lag Speed0Lag of the camera rotation behind the control rotation. 0 = none.
Field Of View90Horizontal FOV in degrees.
Blend Time0.35Seconds to blend into this set. 0 = instant.
Blend CurveNoneOptional float curve (time 0..1 → alpha 0..1). Empty = smooth step.
Pitch / Yaw / Roll Limits(−89.9, 89.9) / (0, 359.999) / (−89.9, 89.9)View rotation limits (X = min, Y = max) applied to the controller while this set is active. Yaw limits are world-space.

Other sections of the asset

PropertyDescription
Third PersonBase third person set.
Third Person RulesArray of FCamForgeSettingsRule: Rule Name, optional Rotation Mode / Stance / Gait conditions, Settings.
Action State OverridesMap of action state name → settings set (third person).
First PersonFirst person set (arm 0, no lag, pitch ±85, blend 0.25).
CollisionSee Collision.
ShoulderSee Shoulder swap.
Lock OnSee Target lock-on.
OcclusionSee Occlusion fade.
Dynamic FOVSee Dynamic FOV.
Third Person Zoom / First Person ZoomSee Smooth zoom.
Teleport Distance1000. A pivot jump larger than this skips lag for that frame. 0 = never.

Target component

Add CamForge Target (UCamForgeTargetComponent) to any pawn for zero-code support. It does not tick; the camera manager reads it every frame.

PropertyDefaultDescription
View Mode / Rotation Mode / Action StateThird Person / Velocity Direction / NoneCurrent state; change with the setters below.
Auto Stance / Manual StanceOn / StandingStance from the character's crouch state, or the manual value.
Auto Gait / Manual GaitOn / WalkingGait from horizontal speed, or the manual value.
Running / Sprinting Speed Threshold300 / 650Speeds for automatic gait.
Pivot Socket Name / Pivot OffsetNone / (0,0,0)Pivot follows this mesh socket (else the actor location) plus an offset in actor space.
First Person Socket Name / Offsethead / (0,0,0)First person location: mesh socket if it exists, else the pawn's eye height.
Fallback Eye Height64Eye height for owners that are not pawns.
Override Trace ParamsOffWhen on, collision uses Trace Origin Offset (actor space), Trace Radius and Trace Channel.
NodeTypeDescription
Set View Mode / Toggle View ModeCallableThird or first person.
Set Rotation ModeCallableVelocity Direction, Looking Direction or Aiming.
Set Stance / Set GaitCallableSet a manual value and turn the automatic detection off.
Set Action State / Clear Action StateCallableNamed action override.
Get Camera StatePureState with automatic stance and gait applied.
Get Pivot Transform / Get First Person Location / Get Trace ParamsPureThe values the camera manager uses (virtual in C++).

Target interface

Implement CamForge Target Interface (ICamForgeTarget) on the view target to drive the camera yourself. Every function is a Blueprint Native Event returning true when it provided a value; return false (or leave it unimplemented) to fall back to the component, then to the defaults.

FunctionTypeDescription
Get Camera StateEventOut: Out State (view mode, rotation mode, stance, gait, action state).
Get Pivot TargetEventOut: Out Pivot Target transform. The set's Pivot Offset is added in its local space.
Get First Person Camera TargetEventOut: Out Location of the first person camera.
Get Camera Trace ParamsEventOut: Out Trace Origin, Out Trace Radius, Out Trace Channel of the collision sweep.
// C++ implementation on a character
UCLASS()
class AMyCharacter : public ACharacter, public ICamForgeTarget
{
    GENERATED_BODY()
public:
    virtual bool GetCameraState_Implementation(FCamForgeCameraState& OutState) override
    {
        OutState.RotationMode = bAiming ? ECamForgeRotationMode::Aiming : ECamForgeRotationMode::LookingDirection;
        OutState.Stance = bIsCrouched ? ECamForgeStance::Crouching : ECamForgeStance::Standing;
        OutState.ActionState = bRolling ? FName(TEXT("Rolling")) : NAME_None;
        return true;
    }
};
Setters and the interfaceWhen the interface returns a camera state, it wins: the manager's state setters still write to the component (or Default Camera State) but those values are not read.

Camera manager nodes

ACamForgePlayerCameraManager (Blueprintable). Properties: CamForge Settings, CamForge Enabled, Default Camera State, Auto Stance / Auto Gait For Default State.

NodeTypeDescription
Set CamForge SettingsCallableReplace the settings asset (None = defaults); the camera blends to the new values.
Set CamForge EnabledCallableOff = the engine's default view (the view target's camera component); view limits return to the class defaults.
Set View Mode / Toggle View Mode / Set Rotation Mode / Set Stance / Set Gait / Set Action State / Clear Action StateCallableForwarded to the view target's component, else written to Default Camera State.
Snap CamForge CameraCallableSkip lag and blends for one frame (teleports, cuts).
Swap Shoulder / Set Shoulder / Get ShoulderCallableSee Shoulder swap.
Lock On To / Clear Lock On / Is Locked On / Get Lock On Target / Find Best Lock On TargetCallableSee Target lock-on.
Add Zoom Input / Reset Zoom / Get Current Arm LengthCallableSee Smooth zoom.
Get Current Camera StatePureState evaluated in the last frame.
Get Current Camera Settings / Get Current Settings NamePureThe blended values and the name of the active set.
Get Current FOV Kick / Get Pivot Location / Get First Person AlphaPureSpeed FOV added, smoothed pivot, and 0 (third) .. 1 (first person).

Events

EventTypeParameters
On View Mode ChangedEventNew View Mode, Previous View Mode
On Rotation Mode ChangedEventNew Rotation Mode, Previous Rotation Mode
On Camera State ChangedEventNew State, Previous State (any field changed)
On Shoulder ChangedEventNew Shoulder
On Lock On ChangedEventNew Target (None when the lock ended), Previous Target

Bind them on the camera manager (for example in your Player Controller after Begin Play with Get CamForge Camera Manager From Controller). State events fire for the main view target, not on the first frame after a view target change.

Collision

A sphere sweep from the trace origin (default: the unlagged pivot) to the desired camera location pulls the camera in front of blocking geometry instantly and eases it back out at Recover Speed. The view target, actors attached to it and its attach parent are ignored.

SettingDefaultDescription
EnabledOnRun the sweep.
Probe Radius12Sweep sphere radius.
Probe ChannelCameraTrace channel.
Recover Speed10Speed of moving back out after an obstruction. 0 = instant.

The interface (Get Camera Trace Params) or the component (Override Trace Params) can replace origin, radius and channel per view target.

First person

In first person the camera sits at the first person target: the interface value, else the component's First Person Socket Name on the skeletal mesh (default head) plus offset, else the pawn's eye height. The First Person set provides FOV, limits and offsets; its Arm Length pulls the camera back from the eyes (with a collision sweep when above 0). Switching view mode blends position, FOV and limits over the destination set's blend time.

Hiding the headCamForge does not change meshes. For first person, hide the head bone or use Owner No See / Only Owner See meshes, for example from On View Mode Changed.

Shoulder swap

The third person Camera Offset Y is multiplied by the shoulder value: Right = +1, Center = 0, Left = −1, blended at Switch Speed. Swap Shoulder toggles Left / Right (from Center it goes to the side opposite the last one used); Set Shoulder picks a side; On Shoulder Changed reports it.

SettingDefaultDescription
Starting ShoulderRightShoulder at Begin Play.
Switch Speed8Blend speed of a change. 0 = instant.

Target lock-on

Lock On To locks onto an actor (fails when it is invalid, the view target itself, or out of range). While locked, the control rotation is steered softly toward the target, the pivot moves part of the way toward it so both stay in frame, and the arm grows with the distance. The lock ends on Clear Lock On, when the target is destroyed, farther than Max Distance, or hidden longer than Lost Sight Time. Find Best Lock On Target picks the candidate closest to the view direction within an angle and the range.

SettingDefaultDescription
Max Distance2500Lock range from the view target. 0 = unlimited.
Require Line Of Sight / Channel / Lost Sight TimeOn / Visibility / 1 sBreak the lock when the target stays hidden.
Target Offset(0, 0, 40)Look-at point relative to the target's location.
Steer Control RotationOnTurn the controller toward the target (movement follows the camera).
Yaw Speed / Pitch Speed / Pitch Offset6 / 4 / −8Softness of the steering and a slight downward look.
Framing Weight / Max Framing Shift0.3 / 250How far the pivot moves toward the target.
Arm Length Per Distance / Max Extra Arm Length0.1 / 150Extra arm length by distance to the target.
Blend Speed5Blend of framing and extra arm when the lock starts or ends.

Occlusion fade

Primitives that block the Occlusion Channel between the trace origin and the camera are faded and restored when they no longer occlude. The view target, its attachments and the locked target are never faded; pawns are skipped by default.

SettingDefaultDescription
EnabledOnFind and fade occluders (main view target only).
ModeHide For PlayerHide For Player: the primitives are hidden for this player only (other players and split-screen views still see them). Material Scalar Parameter: Material Parameter Name is driven from Visible Value to Faded Value at Fade Speed on mesh components (use it with a dithered or translucent material that reads the parameter).
Occlusion Channel / Probe Radius / Max OccludersVisibility / 8 / 8The search sweep.
Fade Whole ActorOnFade every primitive of an occluding actor.
Ignore PawnsOnNever fade characters walking through the shot.
Required TagNoneOnly fade actors or components with this tag.
Max Occluder Radius0Never fade primitives with larger bounds (terrain, huge meshes). 0 = no limit.
Collision Ignores OccludersOffCamera collision ignores faded occluders, so the camera stays behind them instead of moving in front.
Restore Delay0.2Seconds an occluder stays faded after it stopped occluding.
Which objects are faded?With collision on, geometry that blocks the camera's Probe Channel pulls the camera in front of it, so it is no longer between camera and pivot. Occlusion fade therefore affects objects that block Occlusion Channel but not the camera channel (foliage, poles, props set to ignore Camera) — or every occluder when Collision Ignores Occluders is on (use Required Tag or Max Occluder Radius to protect terrain).

Dynamic FOV

Adds field of view as the view target moves faster, smoothed. Without a curve the kick rises linearly from 0 at Min Speed to Max FOV Add at Max Speed.

SettingDefaultDescription
EnabledOnApply the kick.
Min Speed / Max Speed / Max FOV Add450 / 900 / 8Linear mapping.
Speed CurveNoneOptional: speed (time axis) → degrees added; replaces the linear mapping.
Horizontal Speed OnlyOnIgnore falling speed.
Apply In First PersonOnAlso kick in first person.
Interp Speed4Smoothing. 0 = instant.

Smooth zoom

Add Zoom Input changes the arm length of the current view mode by Step Per Input per unit (positive input zooms in) and interpolates toward it. While zoom is enabled for a view mode, the final arm length stays between its Min Arm Length and Max Arm Length. The zoom is kept per view mode across state changes; Reset Zoom returns to the settings' arm length.

SettingThird PersonFirst Person
EnabledOnOff
Min / Max Arm Length120 / 7000 / 0
Step Per Input4040
Interp Speed1010

Function library

NodeTypeDescription
Get CamForge Camera ManagerPureThe CamForge manager of a local player index (None when that player uses another manager).
Get CamForge Camera Manager From ControllerPureThe CamForge manager of a player controller.
Get CamForge Target ComponentPureThe component on an actor.
Implements CamForge TargetPureTrue when an actor implements the interface.
Blend Camera SettingsPureBlend two settings sets.
Camera States EqualPureCompare two camera states.
Set CamForge DebugCallableSets CamForge.Debug (development builds).

Debugging

Console variable CamForge.Debug (development builds):

ValueDraws
0Nothing (default).
1Pivot target (yellow), smoothed pivot (green), collision trace (white), collision hit (red), final camera location (cyan), lock-on target (magenta), faded occluders (orange boxes). Eject (F8) or use a second view to see the shapes around the camera.
2As 1, plus the state, active set, first person alpha, arm length, FOV, shoulder and lock target on screen.

Types

TypeKindDescription
ACamForgePlayerCameraManagerClassThe camera manager.
UCamForgeSettingsData assetAll camera settings.
UCamForgeTargetComponentClassZero-code view target data.
ICamForgeTargetInterfaceView target data from Blueprint or C++.
UCamForgeLibraryClassBlueprint helpers.
FCamForgeCameraStateStructView Mode, Rotation Mode, Stance, Gait, Action State.
FCamForgeCameraSettingsStructOne settings set.
FCamForgeSettingsRuleStructThird person rule.
FCamForgeCollisionSettings, FCamForgeShoulderSettings, FCamForgeLockOnSettings, FCamForgeOcclusionSettings, FCamForgeDynamicFOVSettings, FCamForgeZoomSettingsStructFeature settings.
ECamForgeViewMode, ECamForgeRotationMode, ECamForgeStance, ECamForgeGait, ECamForgeShoulder, ECamForgeOcclusionModeEnumSee the sections above.

Networking

CamForge is not replicated. A camera manager exists only for local players and computes the view on that machine; the component's state is local as well. In multiplayer, drive the camera state from replicated gameplay state on each client (for example set the rotation mode from your replicated aiming flag, or implement the interface on top of replicated variables). Lock-on steers the local control rotation, which the engine sends to the server like any other look input.

Troubleshooting

SymptomCause and fix
The camera did not changeThe Player Controller in use does not have CamForge Player Camera Manager (or a child) as Player Camera Manager Class, or the Game Mode uses another controller.
The camera does not turn with the mouseThe pawn does not add controller yaw / pitch input. CamForge follows the control rotation.
The character always faces away from the camera, or neverCamForge does not rotate the pawn. Use Use Controller Rotation Yaw or Orient Rotation To Movement on the character to match your rotation mode.
Settings changes in the asset have no effectThe asset is not assigned: set CamForge Settings on a Blueprint child of the manager that the controller uses, or call Set CamForge Settings.
A rule never appliesA more specific rule (more conditions) or an earlier rule with the same number of conditions wins. Check with Resolve Settings Name or CamForge.Debug 2.
The first person view shows the inside of the headHide the head for the owner (see First person) or adjust the first person offset.
Walls are not fadedThey block the camera channel, so collision moves the camera in front of them. Enable Collision Ignores Occluders or let those objects ignore the Camera channel.
The terrain disappearsWith Collision Ignores Occluders the terrain can be found as an occluder. Set Max Occluder Radius or a Required Tag.
Lock On To returns falseThe actor is invalid, is the view target itself, or is farther than Max Distance.
Camera snaps after a teleport, or lags after oneJumps above Teleport Distance skip lag automatically; call Snap CamForge Camera for smaller cuts.

Credits

© 2026 Alpha XP — alphaxp.net · Support: support@alphaxp.net. Built and verified for Unreal Engine 4.27 and 5.8.