RealDocs

UCharacterMovementComponent::AddImpulse

function Engine Blueprint Since 4.0
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintCallablevirtual

Description

Applies an instantaneous impulse to the character's velocity. Accumulated impulses are applied at the next movement tick.

Signature

virtual void AddImpulse(FVector Impulse, bool bVelocityChange = false)

Parameters

Name Type Description Default
Impulse FVector The impulse to apply, in world space.
bVelocityChange bool If true, the impulse is treated as a direct velocity change ignoring mass. If false, it is scaled by mass. false

Return Type

void

Caveats & Gotchas

  • Impulses accumulate — multiple calls in the same frame are summed before being applied.
  • Use bVelocityChange=true for gameplay feel (e.g. knockback) where you want a predictable velocity delta regardless of character mass.
  • Does not immediately change movement mode — if the character is grounded, the impulse alone will not cause it to become airborne unless vertical velocity exceeds gravity.

Example

Apply knockback on hit C++
FVector KnockbackDir = (GetActorLocation() - HitSource).GetSafeNormal();
GetCharacterMovement()->AddImpulse(KnockbackDir * 800.f, true);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.