Skip to content

Component Reference

Reference for AutoAimComponent (Content/AutoAimComponent/Blueprints/Main/AutoAimComponent). Default values match the component class defaults in the product project.

For Blueprint asset relationships, demo actors, and function inventory, see Blueprint reference.

---
config:
  state:
    nodeSpacing: 60
    rankSpacing: 70
---
stateDiagram-v2
  direction LR
  [*] --> Idle
  Idle --> Tracing: Start Trace
  Tracing --> Locked: Hit pawn + valid interface
  Tracing --> Failed: No hit / invalid target
  Locked --> Locked: Event Tick updates look-at
  Failed --> Idle: End Trace
  Tracing --> Idle: On Auto Aim Started path completes
  Locked --> Idle: End Trace
  Locked --> Idle: Try Cancel Auto Aim From Input
  Locked --> Idle: On Auto Aim Ended
  note right of Locked
    On Auto Aim Started
    Set Look At Start/Target
    Smooth or instant rotation
  end note
  note right of Failed
    On Auto Aim Failed
    Error message string
  end note
PropertyDefaultDescription
Trace Distance3000Total length of the box trace from the camera
Trace Size100Half-extent of the box trace
Types To TracePawns (ObjectTypeQuery3)Object types included in the trace
Ignore Actors(empty)Actors excluded from the trace
Start Look At ComponentOptional scene component as trace origin
Check Line Of SightfalseVerify unobstructed line to target before aiming
Override Socket NameNoneForce a socket; None = closest socket to hit
PropertyDefaultDescription
Update Every FrametrueRe-read hit target location each frame vs cached hit
Use Smooth AimingtrueInterpolate controller rotation
Interp Speed10Smoothing speed when smooth aiming is on
Use Manual Start LocationfalseUse Start Location variable
Use Manual Target LocationfalseUse Target Location variable
Use Distance Angle CheckfalseUse CT_DistanceBasedAngle for break-off by look angle
PropertyDefaultDescription
Enable Free LookingfalseAllow look input offset while locked
Free Look Distance10Maximum free-look offset
Invert Free Look PitchfalseInvert pitch for free look
Input Time To Cancel0.2Seconds of look-away input before cancel
PropertyDefaultDescription
Draw TracefalseDraw box trace in viewport
Draw Trace Hit SpherefalseDebug sphere at hit location
Show Debug Trace LinefalseLine from start to target while aiming
Print Debug MessagestrueOn-screen and log debug output
EventParametersDescription
Start TraceBegin box trace and attempt lock
End TraceStop tracing and end aim session
Try Cancel Auto Aim From InputIn Axis ValueCancel when player looks away (uses Input Time To Cancel)
Free LookPitch Axis, Yaw AxisApply free-look offset while locked
FunctionDescription
Set Actors To IgnoreSet actors excluded from tracing
Is Aiming NowWhether component is actively aiming
Set Look At Start LocationWorld-space aim origin (usually camera)
Set Look At Target LocationWorld-space aim point (usually socket)
Get Hit TargetActor locked by trace
Get SocketSocket name used for aiming
Get Auto Aim InterfaceBPI_AutoAim from hit target, if implemented
DispatcherParametersWhen it fires
On Auto Aim StartedTrace hit resultTrace succeeded, target found
On Auto Aim EndedAiming ended normally
On Auto Aim FailedError message (string)Trace failed or target unresolved
sequenceDiagram
  participant PC as Player Character
  participant AAC as Auto Aim Component
  participant T as Target (BPI_AutoAim)

  PC->>AAC: Start Trace
  AAC->>T: Box trace
  alt Valid pawn + interface
    AAC-->>PC: On Auto Aim Started
    loop Each tick
      PC->>AAC: Set Look At Start / Target
      AAC->>PC: Controller rotation
    end
  else Miss or no interface
    AAC-->>PC: On Auto Aim Failed
  end
  PC->>AAC: End Trace
  AAC-->>PC: On Auto Aim Ended
FunctionReturnsDescription
Get Skeletal Mesh ComponentSkeletal Mesh ComponentMesh used for socket aim points

Used when Use Distance Angle Check is enabled. Contains a DistanceAngle row mapping distance to maximum look-away angle before auto-aim cancels. Edit in Blueprints/Main/CT_DistanceBasedAngle.

VariableDescription
Hit TargetActor locked by trace
Hit LocationWorld location of trace hit
Closest SocketSocket name chosen for current target
Is Tracing ActiveWhether trace session is active
Current Look At RotationRotation being applied
Owner PawnPawn that owns this component

See Example presets on the overview for copy-paste property combinations (demo default, forgiving lock, snap assist, head-only).