Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
21 results for aim
Apply Point DamageUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoK2Node_EnhancedInputAction. ActionValue type depends on InputAction (Bool, Float, Axis2D, Axis3D). Triggers: Started, Ongoing, Triggered, Completed, Canceled.
EnhancedInputActionUE 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoUGameplayStatics::ApplyDamage. Triggers EventAnyDamage on target.
Apply DamageUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoThe modern UE input system (5.0+). InputAction + InputMappingContext replace the legacy axis/action mappings.
Get subsystem: GetSubsystem(UEnhancedInputLocalPlayerSubsystem, GetPlayerController(0)). Call in EventBeginPlay on the Character or PlayerController. Priority: higher number overrides lower number mappings.
AddMappingContextUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: BP_Projectile with SphereCollision(root), StaticMesh, ProjectileMovementComponent(InitialSpeed=3000, MaxSpeed=3000, bRotationFollowsVelocity=true). OnComponentHit → ApplyDamage(OtherActor, Damage, GetInstigatorController, Self) → SpawnEmitterAtLocation(ImpactPoint) → DestroyActor. Spawner: SpawnActorFromClass(BP_Projectile, MuzzleLocation, MuzzleRotation).
Geometry used for hit-tests and physics. Often simpler than the visual mesh for performance.
Pattern: InputAction Fire → GetMesh → GetSocketTransform(InSocketName='MuzzleSocket') → BreakTransform(outputs Location, Rotation) → MakeTransform(Location=SocketLocation, Rotation=SocketRotation) → SpawnActorFromClass(Class=BP_Projectile, SpawnTransform=Transform). Key: GetSocketTransform must be called on the SkeletalMeshComponent (GetMesh()), not the actor. Use 'World' TransformSpace. SpawnActorFromClass takes a full Transform, not separate Location/Rotation.
SETUP (once per project): 1. Create Input Mapping Context (IMC_Default) in content browser. 2. Create Input Actions (IA_Move, IA_Jump, IA_Look) — set Value Type. 3. In IMC_Default, map keys to each IA. IN CHARACTER EventBeginPlay: GetController → CastTo<PlayerController> → GetSubsystem(UEnhancedInputLocalPlayerSubsystem) → AddMappingContext(IMC_Default, Priority=0). IN EVENT GRAPH: Right-click → search IA_Move → 'IA_Move (EnhancedInputAction)' node appears with Triggered/Started/Completed exec outputs and 'Action Value' data output. For 2D movement: IA_Move → GetAxis2D(ActionValue) → X to AddMovementInput(GetActorRightVector, ScaleValue=X), Y to AddMovementInput(GetActorForwardVector, ScaleValue=Y).