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 knockback
A blocking collision between two shapes. Fires OnHit on both actors. Use for solid impacts.
Pattern: Attack input → Branch(bCanAttack) → PlayMontage(AttackMontage) → SET bCanAttack=false. AnimNotify during montage: GetActorLocation + GetActorForwardVector*AttackRange → SphereTraceMulti(Loc, Loc+Forward*Range, AttackRadius) → ForEach hit: Branch(HitActor != Self AND not already hit) → ApplyDamage(HitActor, Damage). OnMontageEnded → SET bCanAttack=true.
Pattern: Variables bCanDash(bool)=true, DashDistance(float)=1000, DashDuration(float)=0.2. Input → Branch(bCanDash) → SET bCanDash=false → GetActorForwardVector → Multiply(Forward, DashDistance) → Timeline(0→1 over DashDuration) → Update: VLerp(StartLoc, StartLoc+DashOffset, Alpha) → SetActorLocation. Finished → Delay(CooldownTime) → SET bCanDash=true.
Pattern: 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).
bXYOverride/bZOverride: if true, replaces current velocity. If false, adds to it.
LaunchCharacterUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoRequires Simulation Generates Hit Events on physics body.
Event HitUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoOne-shot force. bVelChange=true treats Impulse as velocity change.
Add ImpulseUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: EventBeginPlay or custom event → GetMesh → PlayMontage(MontageToPlay=AM_Attack, Rate=1.0) → Bind to OnMontageEnded delegate on AnimInstance for completion callback. Simpler approach: use Delay(Duration=MontageLength) after PlayMontage as rough callback. Key: PlayMontage is called on SkeletalMeshComponent (GetMesh()). Inputs: 'InSkeletalMeshComponent' and 'MontageToPlay'. Returns montage length as ReturnValue.
Pattern: On EventAnyDamage → GetPlayerController(0) → GetPlayerCameraManager → StartCameraShake(DamageShakeClass, MapRangeClamped(Damage, 0, 100, 0.3, 1.0)). Create CameraShakeClass as BP extending UCameraShakeBase with RotOscillation and LocOscillation settings.
StopMontageUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago