Skip to content

Blueprint Reference

Reference for Blueprint assets under Content/AutoAimComponent/. Default values were read from class defaults in the product project via the Unreal editor.

For editable property descriptions and gameplay-oriented API notes, see Component reference.

flowchart TB
  FPC["FirstPersonCharacter<br/>Auto Aim Component · First Person Camera · InputActionStartTargeting"]
  AAC["AutoAimComponent<br/>TraceDistance: 3000 · TraceSize: 100 · InterpSpeed: 10<br/>StartTrace() · EndTrace() · GetHitTarget()"]
  NPC["ThirdPersonCharacter_NPC<br/>bCanMove · BPI_AutoAim"]
  BPI["«Interface» BPI_AutoAim<br/>GetSkeletalMeshComponent()"]
  CT["CT_DistanceBasedAngle<br/>DistanceAngle row"]

  FPC -->|owns| AAC
  FPC -->|GetAutoAimInterface| BPI
  NPC -.->|implements| BPI
  AAC -->|CheckDistanceAngle| CT
  AAC -->|box trace HitTarget| NPC
AssetPathRole
AutoAimComponentBlueprints/Main/AutoAimComponentCore aim component (migrate)
BPI_AutoAimBlueprints/Main/BPI_AutoAimTarget interface (migrate)
CT_DistanceBasedAngleBlueprints/Main/CT_DistanceBasedAngleDistance–angle curve (migrate)
FirstPersonCharacterBlueprints/FirstPersonCharacterDemo player integration
ThirdPersonCharacter_NPCBlueprints/ThirdPersonCharacter_NPCDemo aimable target
FirstPersonGameModeBlueprints/FirstPersonGameModeDemo game mode
FirstPersonProjectileBlueprints/FirstPersonProjectileDemo weapon projectile
WBP_PlayerHUDBlueprints/WBP_PlayerHUDDemo HUD widget
AutoAimComponentExampleMapMap/AutoAimComponentExampleMapDemo level

Parent class: ActorComponent

Blueprint component added to a Character or Pawn. Performs box traces, resolves skeletal sockets on BPI_AutoAim targets, and drives controller rotation.

PropertyDefaultNotes
Trace Distance3000Box trace length from camera
Trace Size100Box half-extent
Types To TracePawns (ObjectTypeQuery3)Object types for trace
Use Smooth AimingtrueInterpolate controller rotation
Interp Speed10Smooth aim speed
Update Every FrametrueRe-read target each tick
Check Line Of SightfalseLOS gate before aiming
Use Distance Angle CheckfalseUses CT_DistanceBasedAngle
Enable Free LookingfalseLook offset while locked
Free Look Distance10Max free-look offset
Input Time To Cancel0.2Look-away time before cancel
Override Socket NameNoneForce socket; else closest
Draw TracefalseDebug box trace
Print Debug MessagestrueScreen / log debug
VariablePurpose
Hit TargetActor locked by trace
Hit LocationWorld hit from trace
Closest SocketResolved socket name
Is Tracing ActiveTrace session active
Owner PawnOwning pawn reference
Current Look At RotationApplied aim rotation
Start Location / Target LocationManual look-at points
Ignore ActorsTrace exclusion list
Camera ComponentInternal camera reference
Start Look At ComponentOptional trace origin override
EventParametersDescription
Start TraceBegin box trace; fire On Auto Aim Started or Failed
End TraceStop trace and end aim session
Try Cancel Auto Aim From InputIn Axis Value (float)Break lock when player looks away
Free LookPitch Axis, Yaw Axis (float)Offset aim while locked
FunctionDescription
Set Actors To IgnoreReplace trace ignore list
Is Aiming NowReturns whether aim is active
Set Look At Start LocationSet aim origin (Vector by ref)
Set Look At Target LocationSet aim target (Vector by ref)
Get Hit TargetReturns locked actor
Get SocketReturns socket name for aiming
Get Auto Aim InterfaceReturns BPI_AutoAim from Hit Target
FunctionDescription
Internal_TraceBox trace implementation
Internal_TraceFailedFailed trace handling
Internal_GetLookAtRotationCompute aim rotation
Internal_GetLookAtStartLocationResolve start point
Internal_GetLookAtTargetLocationResolve target point
Internal_GetClosestSocketFromLocationPick nearest socket
Internal_HasLineOfSightLOS check to target
Internal_ShowDebugTraceLineDebug line draw
CheckDistanceAngleCurve-based break-off test
DispatcherParameters
On Auto Aim StartedTrace hit result
On Auto Aim Ended
On Auto Aim FailedError message (string)
sequenceDiagram
  participant Caller as Player Blueprint
  participant AAC as AutoAimComponent
  participant Target as BPI_AutoAim actor

  Caller->>AAC: Start Trace
  AAC->>AAC: Internal_Trace
  alt Hit pawn
    AAC-->>Caller: On Auto Aim Started
    loop Event Tick
      Caller->>AAC: Set Look At Start / Target
      Caller->>Target: Get Auto Aim Interface
      AAC->>AAC: Internal_GetLookAtRotation
    end
  else Miss
    AAC-->>Caller: On Auto Aim Failed
  end
  Caller->>AAC: End Trace
  AAC-->>Caller: On Auto Aim Ended

Blueprint interface — implement on any Character with a skeletal mesh you want to lock onto.

FunctionReturnsDescription
Get Skeletal Mesh ComponentSkeletal Mesh ComponentMesh used for socket locations

Implemented by: ThirdPersonCharacter_NPC (returns Mesh).

Curve table asset used when Use Distance Angle Check is enabled on AutoAimComponent.

RowPurpose
DistanceAngleMaps distance to maximum look-away angle before cancel

Edit keys in the DistanceAngle row to tune break-off feel at different ranges.

Parent class: Character

Demo player Blueprint on AutoAimComponentExampleMap. Shows full integration pattern.

ComponentPurpose
Auto Aim ComponentLock-on / aim assist
First Person CameraView + trace origin
FP_GunFirst-person weapon mesh
Mesh2PArms mesh
SphereCollision / interaction
VariablePurpose
Gun OffsetWeapon offset from camera
Base Turn RateMouse turn scale
Base Look Up RateMouse pitch scale
Player HUDWBP_PlayerHUD reference
InputCalls
InputActionStartTargeting (pressed)Start Trace
InputActionStartTargeting (released)End Trace
Turn / Look Up axisFree Look, Try Cancel Auto Aim From Input
EventBehaviour
Event TickGet Hit TargetGet Auto Aim Interface → socket location → Set Look At Start/Target Location
On Auto Aim StartedUses trace hit result (bound on component)
On Auto Aim EndedCleanup (bound on component)
On Auto Aim FailedError feedback (bound on component)

Parent class: Character

Demo NPC target placed on AutoAimComponentExampleMap (four instances in the level).

InterfaceImplementation
BPI_AutoAimGet Skeletal Mesh ComponentMesh
VariablePurpose
Base Turn RateNPC turn rate (demo)
Base Look Up RateNPC look rate (demo)
b Can MoveMovement toggle (demo)
GraphPurpose
GetSkeletalMeshComponentInterface function
EventGraphStandard character logic
UserConstructionScriptConstruction script

These ship with the example project and are not required for migration.

AssetParentNotes
FirstPersonGameModeGameModeBaseDefault mode for example map
FirstPersonProjectileActorSpawned on Fire input
FirstPersonHUDHUDLegacy HUD class
WBP_PlayerHUDUserWidgetCrosshair / HUD widget
TopicPage
Property descriptions & presetsComponent reference
Hands-on wiringAdd lock-on to your character
Target setupMake an aimable target