# Get Focal Point Of Pawn

The **Get Focal Point Of Pawn** Blueprint function returns a <span class="fr-term" tabindex="0" data-tooltip-key="world-space">world space</span> point that the pawn should look or aim at.

Use this when you want the same Control Rig setup to work for player characters, AI, and editor preview without writing separate logic for each case. The usual setup is to call it from a pure const Animation Blueprint function and feed the result into a Control Rig input through <span class="fr-term" tabindex="0" data-tooltip-key="property-access">Property Access</span>, like in [Third-Person Setup](third-person-setup.md).

In C++, this function is `UFocalRigBlueprintFunctionLibrary::GetFocalPointOfPawn`.

## Usage

1. In the Animation Blueprint, make a pure const function such as `GetFocalPoint`.
2. Call `Try Get Pawn Owner`.
3. Pass that pawn into **Get Focal Point Of Pawn**.
4. Return the result and connect it to the Control Rig input through <span class="fr-term" tabindex="0" data-tooltip-key="property-access">Property Access</span>.

Do not call this function directly from the Animation Blueprint graph. It is not thread-safe.

## Behavior

| Case | Result |
|------|--------|
| AI-controlled pawn | Uses the AI controller's focus, with optional preferred sockets on a focused character mesh |
| Player-controlled pawn | Traces forward from the center of the screen and returns the hit point |
| Pawn with another or no recognized controller | Uses `GetActorEyesViewPoint` and returns a point in front of the pawn |
| No pawn | Uses the editor preview fallback location |

For player-controlled pawns, if the trace does not hit anything, the function returns the end of the trace instead of failing.

## Focal Point Settings

| Property | Type | Description |
|----------|------|-------------|
| AI Controller | [AI Controller Settings](#ai-controller-settings) | Rules for AI focus actors and focused-character sockets |
| Player Controller | [Player Controller Settings](#player-controller-settings) | Screen-center trace settings for local players |
| Pawn | [Pawn Settings](#pawn-settings) | Fallback used when the pawn is not controlled by AI or a player controller |
| Editor Preview | [Editor Preview Settings](#editor-preview-settings) | Fixed fallback used when no pawn is available |

### AI Controller Settings

| Property | Type | Description |
|----------|------|-------------|
| Preferred Sockets On Focused Character Mesh | Name array | If the focus actor is a Character, the function tries these sockets on its mesh in order before falling back to the AI controller focal point |
| First Person Camera Threshold | float | If the focus actor is player-controlled and their camera is within this distance of the chosen focal point, use the camera location instead. Set to `0` or below to disable this |

By default, the preferred socket list is `pov`, `camera`, `VB camera_attach`, then `head`.

### Player Controller Settings

| Property | Type | Description |
|----------|------|-------------|
| Trace Channel | Collision Channel | Channel used for the screen-center line trace |
| Trace Distance | float | Maximum trace distance |
| Additional Actors To Ignore | Actor array | Extra actors to ignore besides the pawn itself |

In third person, the trace starts far enough forward to avoid immediately picking targets behind the character because the camera sits behind the pawn.

### Pawn Settings

| Property | Type | Description |
|----------|------|-------------|
| Distance In Front Of View | float | Distance in front of `GetActorEyesViewPoint` used for the fallback focal point |

### Editor Preview Settings

| Property | Type | Description |
|----------|------|-------------|
| Focal Point | Vector | Fixed fallback point used in editor preview worlds |
