How-To: Show Lock-On Indicators
Goal: draw on-screen indicators over lockable targets - a soft marker on candidates you can lock onto, and, once you lock a target, an indicator on each of its lock points with the active one highlighted.
LockOnPoints use socket/bone names that exist on its skeletal mesh (an unresolved name falls back to the actor centre and logs a one-time warning).1. It works out of the box
CrimsonCamera ships a default indicator widget and points the project setting at it through Config/DefaultCrimsonCamera.ini, so indicators appear as soon as lock-on works - no wiring required. The rest of this page is about customizing them.
2. Use your own indicator widget
Make a Blueprint subclass of UCrimsonLockOnIndicatorWidget (your art), then point either the project default or a single actor at it.
IndicatorWidgetClassOverride (null by default) takes precedence over the project default, so you change one special target without touching the rest. bShowIndicator on the component disables the indicator for that actor entirely.3. Drive the two states
Each indicator has two states: Available ("can be locked on", soft) and Locked ("we ARE locked on", hard). In your widget, handle On Indicator State Changed to swap visuals - e.g. a dot for Available, a ring for Locked. Positioning (centred on the lock point) and distance scaling are handled for you.
On Indicator State Changed is a Blueprint event). In C++ you override the BlueprintNativeEvents Update Screen Position (edge-clamping / off-screen arrows) and Update Distance Scale (custom falloff) instead.4. Tune when the soft markers show
The locked target always shows its indicators; the soft Available markers on other candidates are gated by the config and a runtime switch:
| Setting | Where | Effect |
|---|---|---|
bShowAvailableIndicators | UCrimsonLockOnConfig | Master switch for the soft Available markers (default on). |
bOnlyShowAvailableWhileLocked | UCrimsonLockOnConfig | Off by default. When on, markers only appear while you are locked on - so nothing shows until your first lock-on, and they hide again on release. |
IndicatorRefreshInterval | UCrimsonLockOnConfig | Seconds between candidate re-scans (default 0.2). |
SetIndicatorsEnabled(bool) | UCrimsonLockOnComponent (runtime) | Toggle the soft markers live - e.g. show them only while aiming. |
DistanceScaleMode (ClampedLinear, Curve, or None) scales it down with camera distance so it holds a roughly constant apparent size against the target.bOnlyShowAvailableWhileLocked on, the soft markers appear only after your first lock-on and hide again on release; toggling SetIndicatorsEnabled(false) hides them live.See also
- Concept: Lock-On Pipeline - how targeting, the component, and the camera mode fit together.
- Lock-On Reference (in API Reference) - the indicator widget, settings, and config flags.