# First Person Aim Target

The **First Person Aim Target** node produces an aim target by sphere-tracing from the camera into the scene. It casts a ray along a configurable local axis of the camera transform, starting at a given distance and extending out to a maximum range. If the trace hits geometry, the impact point is returned; otherwise a point at the maximum distance is used.

Input and output are in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span>. The owning actor or component is automatically ignored by the trace.

![First Person Aim Target node](_media/first-person-aim-target-node.png ':size=1200')

## Usage

1. Add the **First Person Aim Target** node to your Control Rig graph
2. Connect the **Camera Transform** (camera transform in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span>)
3. Adjust **Start Distance** so the trace begins past the character's head/weapon geometry
4. Set **Max Distance** to the furthest range you want to aim at
5. Optionally increase **Trace Radius** to use a sphere trace instead of a thin line trace
6. Use the **Aim Target** output as the target for downstream aim nodes (e.g. Aim Chain, Aim Eyes)

Place this node **before** any aim-solving nodes in your graph.

Recommended first-person aiming chain:

```
First Person Camera Control → First Person Aim Target → Apply Spray To Target → Aim Weapon
```

If you also want visible camera recoil, branch the same base camera through [Apply Spray To Camera](apply-spray-to-camera.md) before [First Person View](first-person-view.md).

Do not assume this trace is always the same as the final fired shot. If your setup fires from the weapon muzzle, use the muzzle after the rig has aimed it. If your project fires from a camera or view trace instead, keep using that setup.

## Output Pins

| Pin | Type | Description |
|-----|------|-------------|
| Aim Target | Vector | The resulting aim target position in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span> |
| Hit | bool | True if the trace hit geometry; false if the target is at Max Distance |

## Input Pins

| Pin | Type | Description |
|-----|------|-------------|
| Camera Transform | Transform | The camera transform in <span class="fr-term" tabindex="0" data-tooltip-key="global-space">global space</span> |
| Local Axis | Vector | Local-space direction to trace along, relative to the camera transform. Default is forward (X-axis) |
| Start Distance | float | Distance along the ray at which the trace begins (cm). Increase this to skip past nearby geometry like the character's own mesh |
| Max Distance | float | Maximum distance along the ray for the trace (cm, default: 2000) |
| Trace Radius | float | Radius of the sphere trace (cm). Set to 0 for a thin line trace |
| Channel | Collision Channel | Collision channel used for the trace (default: Camera) |
| Trace Complex | bool | Whether the trace should use complex (per-poly) collision |
| Debug | [Debug Settings](#debug-visualization) | Debug visualization settings |

## Trace Radius

When **Trace Radius** is 0 the node performs a thin line trace, which is precise but can miss small gaps in geometry. Increasing the radius turns it into a sphere trace, which is more forgiving and better represents the area the character is actually aiming at.

## Debug Visualization

Enable **Debug** to see the trace in the viewport:

Use this debug view in this order:

1. Check the light-blue line to see the trace path.
2. If there is a hit, check the red sphere and point to see where the trace stopped.
3. If there is no hit, check the light-blue end sphere to see the max trace distance.

| Debug item | Meaning |
|------------|---------|
| Light-blue trace line | Trace path to the hit point or to max distance when nothing is hit |
| Red hit sphere and point | Impact point on geometry, using the current trace radius |
| Red continuation past the hit | Portion of the trace beyond the impact point up to max distance |
| Light-blue end sphere | Max trace distance when nothing is hit |
