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
| Requirement | Details |
|---|---|
| Unreal Engine | 4.27 and 5.8 (verified clean on both) |
| Module | CamForge (Runtime) |
| Dependencies | None (engine modules only; no other plugins are enabled) |
| Content | None — all defaults live in C++ |
| Language | Blueprints and C++ |
| Platforms | Win64 and Mac (the module lists these platforms in the plugin descriptor). The code is platform-independent engine C++ with no OS-specific calls. |
| Networking | Not replicated — every player computes its own camera locally (see Networking). |
Installation
- Install CamForge from Fab into your engine, or copy the
CamForgefolder into your project'sPluginsfolder. - For a C++ project, regenerate project files and build the editor target.
- Open the project, enable CamForge in Edit > Plugins and restart the editor.
- C++ only: add
PublicDependencyModuleNames.Add("CamForge");to yourBuild.cs.
Quick start
Blueprint
- 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.
- 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.
- 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.
- 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.
- 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
- 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:
- Reads the camera state (interface → component → Default Camera State) and fires events when it changed.
- 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).
- Takes the controller's control rotation and applies Rotation Lag Speed.
- 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.
- 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.
- Places the first person camera at the first person target plus Camera Offset.
- 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 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).
| Field | Values | Description |
|---|---|---|
| View Mode | Third Person, First Person | Selects the rig. First Person always uses the First Person set. |
| Rotation Mode | Velocity Direction, Looking Direction, Aiming | How the character is oriented; your character logic sets it (CamForge does not rotate the pawn). |
| Stance | Standing, Crouching | Automatic from the character's crouch state by default. |
| Gait | Walking, Running, Sprinting | Automatic from horizontal speed by default (Running from 300, Sprinting from 650 units/s). |
| Action State | Any name, None | Optional 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
| Situation | Set used |
|---|---|
| View Mode = First Person | First Person |
| Third person, Action State listed in Action State Overrides | That override |
| Third person, one or more Third Person Rules match | The rule with the most enabled conditions (rotation mode, stance, gait); ties go to the earlier rule |
| Third person, nothing matches | Third 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)
| Setting | Default | Description |
|---|---|---|
| Arm Length | 300 | Distance 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 Speed | 0 | Lag of the camera rotation behind the control rotation. 0 = none. |
| Field Of View | 90 | Horizontal FOV in degrees. |
| Blend Time | 0.35 | Seconds to blend into this set. 0 = instant. |
| Blend Curve | None | Optional 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
| Property | Description |
|---|---|
| Third Person | Base third person set. |
| Third Person Rules | Array of FCamForgeSettingsRule: Rule Name, optional Rotation Mode / Stance / Gait conditions, Settings. |
| Action State Overrides | Map of action state name → settings set (third person). |
| First Person | First person set (arm 0, no lag, pitch ±85, blend 0.25). |
| Collision | See Collision. |
| Shoulder | See Shoulder swap. |
| Lock On | See Target lock-on. |
| Occlusion | See Occlusion fade. |
| Dynamic FOV | See Dynamic FOV. |
| Third Person Zoom / First Person Zoom | See Smooth zoom. |
| Teleport Distance | 1000. 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.
| Property | Default | Description |
|---|---|---|
| View Mode / Rotation Mode / Action State | Third Person / Velocity Direction / None | Current state; change with the setters below. |
| Auto Stance / Manual Stance | On / Standing | Stance from the character's crouch state, or the manual value. |
| Auto Gait / Manual Gait | On / Walking | Gait from horizontal speed, or the manual value. |
| Running / Sprinting Speed Threshold | 300 / 650 | Speeds for automatic gait. |
| Pivot Socket Name / Pivot Offset | None / (0,0,0) | Pivot follows this mesh socket (else the actor location) plus an offset in actor space. |
| First Person Socket Name / Offset | head / (0,0,0) | First person location: mesh socket if it exists, else the pawn's eye height. |
| Fallback Eye Height | 64 | Eye height for owners that are not pawns. |
| Override Trace Params | Off | When on, collision uses Trace Origin Offset (actor space), Trace Radius and Trace Channel. |
| Node | Type | Description |
|---|---|---|
| Set View Mode / Toggle View Mode | Callable | Third or first person. |
| Set Rotation Mode | Callable | Velocity Direction, Looking Direction or Aiming. |
| Set Stance / Set Gait | Callable | Set a manual value and turn the automatic detection off. |
| Set Action State / Clear Action State | Callable | Named action override. |
| Get Camera State | Pure | State with automatic stance and gait applied. |
| Get Pivot Transform / Get First Person Location / Get Trace Params | Pure | The 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.
| Function | Type | Description |
|---|---|---|
| Get Camera State | Event | Out: Out State (view mode, rotation mode, stance, gait, action state). |
| Get Pivot Target | Event | Out: Out Pivot Target transform. The set's Pivot Offset is added in its local space. |
| Get First Person Camera Target | Event | Out: Out Location of the first person camera. |
| Get Camera Trace Params | Event | Out: 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;
}
};
Camera manager nodes
ACamForgePlayerCameraManager (Blueprintable). Properties: CamForge Settings, CamForge Enabled, Default Camera State, Auto Stance / Auto Gait For Default State.
| Node | Type | Description |
|---|---|---|
| Set CamForge Settings | Callable | Replace the settings asset (None = defaults); the camera blends to the new values. |
| Set CamForge Enabled | Callable | Off = 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 State | Callable | Forwarded to the view target's component, else written to Default Camera State. |
| Snap CamForge Camera | Callable | Skip lag and blends for one frame (teleports, cuts). |
| Swap Shoulder / Set Shoulder / Get Shoulder | Callable | See Shoulder swap. |
| Lock On To / Clear Lock On / Is Locked On / Get Lock On Target / Find Best Lock On Target | Callable | See Target lock-on. |
| Add Zoom Input / Reset Zoom / Get Current Arm Length | Callable | See Smooth zoom. |
| Get Current Camera State | Pure | State evaluated in the last frame. |
| Get Current Camera Settings / Get Current Settings Name | Pure | The blended values and the name of the active set. |
| Get Current FOV Kick / Get Pivot Location / Get First Person Alpha | Pure | Speed FOV added, smoothed pivot, and 0 (third) .. 1 (first person). |
Events
| Event | Type | Parameters |
|---|---|---|
| On View Mode Changed | Event | New View Mode, Previous View Mode |
| On Rotation Mode Changed | Event | New Rotation Mode, Previous Rotation Mode |
| On Camera State Changed | Event | New State, Previous State (any field changed) |
| On Shoulder Changed | Event | New Shoulder |
| On Lock On Changed | Event | New 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.
| Setting | Default | Description |
|---|---|---|
| Enabled | On | Run the sweep. |
| Probe Radius | 12 | Sweep sphere radius. |
| Probe Channel | Camera | Trace channel. |
| Recover Speed | 10 | Speed 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.
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.
| Setting | Default | Description |
|---|---|---|
| Starting Shoulder | Right | Shoulder at Begin Play. |
| Switch Speed | 8 | Blend 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.
| Setting | Default | Description |
|---|---|---|
| Max Distance | 2500 | Lock range from the view target. 0 = unlimited. |
| Require Line Of Sight / Channel / Lost Sight Time | On / Visibility / 1 s | Break the lock when the target stays hidden. |
| Target Offset | (0, 0, 40) | Look-at point relative to the target's location. |
| Steer Control Rotation | On | Turn the controller toward the target (movement follows the camera). |
| Yaw Speed / Pitch Speed / Pitch Offset | 6 / 4 / −8 | Softness of the steering and a slight downward look. |
| Framing Weight / Max Framing Shift | 0.3 / 250 | How far the pivot moves toward the target. |
| Arm Length Per Distance / Max Extra Arm Length | 0.1 / 150 | Extra arm length by distance to the target. |
| Blend Speed | 5 | Blend 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.
| Setting | Default | Description |
|---|---|---|
| Enabled | On | Find and fade occluders (main view target only). |
| Mode | Hide For Player | Hide 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 Occluders | Visibility / 8 / 8 | The search sweep. |
| Fade Whole Actor | On | Fade every primitive of an occluding actor. |
| Ignore Pawns | On | Never fade characters walking through the shot. |
| Required Tag | None | Only fade actors or components with this tag. |
| Max Occluder Radius | 0 | Never fade primitives with larger bounds (terrain, huge meshes). 0 = no limit. |
| Collision Ignores Occluders | Off | Camera collision ignores faded occluders, so the camera stays behind them instead of moving in front. |
| Restore Delay | 0.2 | Seconds an occluder stays faded after it stopped occluding. |
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.
| Setting | Default | Description |
|---|---|---|
| Enabled | On | Apply the kick. |
| Min Speed / Max Speed / Max FOV Add | 450 / 900 / 8 | Linear mapping. |
| Speed Curve | None | Optional: speed (time axis) → degrees added; replaces the linear mapping. |
| Horizontal Speed Only | On | Ignore falling speed. |
| Apply In First Person | On | Also kick in first person. |
| Interp Speed | 4 | Smoothing. 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.
| Setting | Third Person | First Person |
|---|---|---|
| Enabled | On | Off |
| Min / Max Arm Length | 120 / 700 | 0 / 0 |
| Step Per Input | 40 | 40 |
| Interp Speed | 10 | 10 |
Function library
| Node | Type | Description |
|---|---|---|
| Get CamForge Camera Manager | Pure | The CamForge manager of a local player index (None when that player uses another manager). |
| Get CamForge Camera Manager From Controller | Pure | The CamForge manager of a player controller. |
| Get CamForge Target Component | Pure | The component on an actor. |
| Implements CamForge Target | Pure | True when an actor implements the interface. |
| Blend Camera Settings | Pure | Blend two settings sets. |
| Camera States Equal | Pure | Compare two camera states. |
| Set CamForge Debug | Callable | Sets CamForge.Debug (development builds). |
Debugging
Console variable CamForge.Debug (development builds):
| Value | Draws |
|---|---|
| 0 | Nothing (default). |
| 1 | Pivot 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. |
| 2 | As 1, plus the state, active set, first person alpha, arm length, FOV, shoulder and lock target on screen. |
Types
| Type | Kind | Description |
|---|---|---|
| ACamForgePlayerCameraManager | Class | The camera manager. |
| UCamForgeSettings | Data asset | All camera settings. |
| UCamForgeTargetComponent | Class | Zero-code view target data. |
| ICamForgeTarget | Interface | View target data from Blueprint or C++. |
| UCamForgeLibrary | Class | Blueprint helpers. |
| FCamForgeCameraState | Struct | View Mode, Rotation Mode, Stance, Gait, Action State. |
| FCamForgeCameraSettings | Struct | One settings set. |
| FCamForgeSettingsRule | Struct | Third person rule. |
| FCamForgeCollisionSettings, FCamForgeShoulderSettings, FCamForgeLockOnSettings, FCamForgeOcclusionSettings, FCamForgeDynamicFOVSettings, FCamForgeZoomSettings | Struct | Feature settings. |
| ECamForgeViewMode, ECamForgeRotationMode, ECamForgeStance, ECamForgeGait, ECamForgeShoulder, ECamForgeOcclusionMode | Enum | See 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
| Symptom | Cause and fix |
|---|---|
| The camera did not change | The 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 mouse | The pawn does not add controller yaw / pitch input. CamForge follows the control rotation. |
| The character always faces away from the camera, or never | CamForge 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 effect | The 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 applies | A 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 head | Hide the head for the owner (see First person) or adjust the first person offset. |
| Walls are not faded | They 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 disappears | With Collision Ignores Occluders the terrain can be found as an occluder. Set Max Occluder Radius or a Required Tag. |
| Lock On To returns false | The actor is invalid, is the view target itself, or is farther than Max Distance. |
| Camera snaps after a teleport, or lags after one | Jumps 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.