RealDocs

UCharacterMovementComponent::AddRadialForce

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

Description

Applies a continuous outward force to the character if it's within Radius of Origin, accumulating into the forces consumed by movement each tick.

Caveats & Gotchas

  • Does nothing if the character's distance from Origin exceeds Radius — it's a simple point-distance check against UpdatedComponent's location, with no capsule-overlap handling.
  • With RIF_Linear falloff the force scales down to zero at the edge of Radius; any other falloff value applies the full Strength regardless of distance.
  • The force is queued via AddForce() and only takes effect on the next movement update, not immediately.

Signature

virtual void AddRadialForce(const FVector& Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff) override

Parameters

Name Type Description Default
Origin const FVector& World-space center of the force.
Radius float Distance from Origin within which the force is applied.
Strength float Force magnitude at the origin (or overall magnitude when Falloff is constant).
Falloff ERadialImpulseFalloff Whether force strength stays constant or falls off linearly with distance.

Return Type

void

Example

Applying explosion force C++
GetCharacterMovement()->AddRadialForce(ExplosionLocation, 800.f, 400000.f, RIF_Linear);

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.