# First Person Camera Control

The **First Person Camera Control** node takes a camera transform and applies effects to it: [translation smoothing](#translation-smoothing), [head bob](#head-bob), [idle sway](#idle-sway), [landing dip](#landing-dip), and [world collision](#world-collision). It outputs a desired camera transform that you can send into [First Person View](first-person-view.md) (often via [Apply Spray To Camera](apply-spray-to-camera.md)) and/or into [First Person Aim Target](first-person-aim-target.md). 

![First Person Camera Control node](_media/first-person-camera-control-node.png ':size=1200')

## Usage

1. Add the **First Person Camera Control** node to your Control Rig graph
2. Connect the raw camera transform to the **Input Camera Transform** input in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span>
3. Configure smoothing, head bob, landing dip, and sphere trace settings
4. Feed **Output Camera Transform** into [First Person Aim Target](first-person-aim-target.md)
5. If you want visible camera recoil, branch the same output through [Apply Spray To Camera](apply-spray-to-camera.md) before [First Person View](first-person-view.md) and feed both spray nodes the same [Spray Settings](spray.md?id=spray-settings)

## Output Pins

| Pin | Type | Description |
|-----|------|-------------|
| Output Camera Transform | Transform | The processed camera transform in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span> |

## Input Pins

| Pin | Type | Description |
|-----|------|-------------|
| Input Camera Transform | Transform | The input camera transform in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span> |
| Translation Smoothing | [Smoothing Settings](smoothing.md) | Spring interpolation settings for smoothing translation |
| Head Bob | [Bob Settings](bob.md) | Head bob settings for procedural locomotion oscillation |
| Idle Sway | [Idle Sway Settings](idle-sway.md) | Idle sway settings for subtle camera drift when standing still |
| Landing Dip | [Landing Dip Settings](landing-dip.md) | Landing dip settings for impact absorption effect |
| World Collision | [World Collision Settings](#world-collision) | World collision settings for preventing the camera from clipping through geometry |
| Debug | [Debug Settings](#debug-draw) | Debug draw settings |
| Weight | float | The blend weight of this operation (0 = no effect, 1 = full effect) |

## Translation Smoothing

Applies spring interpolation to the camera's translation in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span>. This smooths out sudden position changes (e.g., from crouching or stairs) without jitter.

![Translation smoothing comparison](_media/translation-smoothing-comparison.mp4 ':include :type=video autoplay loop muted playsinline')

Translation Smoothing softens the camera's translation before bob, sway, landing dip, and world collision are applied. Use it to take the edge off abrupt height and position changes such as crouches, steps, or uneven terrain.

See [Smoothing](smoothing.md) for the field breakdown.

## Head Bob

Adds procedural locomotion oscillation to the camera using a figure-8 pattern. Vertical and pitch bob at double the stride frequency (once per footfall), while horizontal and roll bob at the stride frequency (once per stride).

![Head bob comparison](_media/head-bob-comparison.mp4 ':include :type=video autoplay loop muted playsinline')

Head Bob applies locomotion bob directly to the camera before world collision runs. Use **External** source mode when you want the camera and the weapon to share one stride phasor while still using different amplitudes or phase offsets.

See [Bob](bob.md) for the field breakdown.


## Idle Sway

Adds subtle multi-axis sinusoidal oscillation when the character is standing still or moving slowly. The frequency ratios between axes are mutually irrational (√3, 1/√2, φ, etc.) so the motion never visibly repeats.

Intensity fades out as movement speed increases, controlled by the **Speed Range** setting.

![Idle sway comparison](_media/idle-sway-comparison.mp4 ':include :type=video autoplay loop muted playsinline')

Idle Sway adds subtle breathing and drift to the camera itself. The effect fades out over **Speed Range**, so it can coexist cleanly with locomotion bob.

See [Idle Sway](idle-sway.md) for the field breakdown.

## Landing Dip

Dips the camera downward on landing to sell the impact. Harder landings produce deeper dips, and overlapping landings stack up to a maximum.

Landings can be auto-detected from the movement component, supplied manually via **Last Landing**, or both.

![Landing dip comparison](_media/landing-dip-comparison.mp4 ':include :type=video autoplay loop muted playsinline')

Landing Dip applies a short downward impact reaction to the camera so landings read as a body hit instead of a perfectly smooth stop. Use manual landings when gameplay already knows exactly when a landing happened and how hard it was.

See [Landing Dip](landing-dip.md) for the field breakdown.

## World Collision

Uses two sphere sweeps to keep the camera from passing through world geometry. The first clamps movement from the input position to the processed position after smoothing, bob, sway, and dip.

The second sweeps to the result from a point based on **Collision Origin**, catching obstacles the input position has already crossed. Set Collision Origin in the rig's <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span>. **Camera Height Fraction** blends only its Z coordinate toward the camera height.

This prevents clipping when smoothing lags behind a crouch under a low ceiling, for example.

| Property | Type | Description |
|----------|------|-------------|
| Enabled | bool | Whether world collision handling is enabled |
| Radius | float | Radius of both sphere sweeps in cm |
| Collision Origin | Vector | Base rig-global location for the second collision sweep. Default: `(0, 0, 0)` |
| Camera Height Fraction | float | Vertical blend from Collision Origin to the camera. 0 uses the origin height; 1 uses the camera height. Default: 0.5 |
| Channel | Collision Channel | Collision channel used by both sweeps. Default: Camera |
| Ignored Object Types | Object Type array | Object types ignored by both sweeps. Pawn is ignored by default |
| Trace Complex | bool | Whether to use complex collision geometry |

![World collision comparison](_media/world-collision-comparison.mp4 ':include :type=video autoplay loop muted playsinline')

## Debug Draw

| Property | Type | Description |
|----------|------|-------------|
| Enabled | bool | Whether to draw debug visualization |
| Scale | float | Scale factor for debug visualization sizes |

Use this debug view in this order:

1. Check the white line to see the total camera displacement from all effects.
2. Check the green sweep paths to see the tested camera travel.
3. If there is a hit, check where the path changes from green to red.
4. A magenta path means the sweep started inside collision, so that sweep could not establish a safe side.

| Debug item | Meaning |
|------------|---------|
| White line | Total displacement from the input camera position to the final processed camera position |
| Green sweep path and spheres | Clear portion of a sweep |
| Red hit sphere, hit point, and continuation | Collision location and the rejected remainder of the sweep |
| Magenta sweep path and spheres | Sweep started inside collision |
