UCharacterMovementComponent::InitialPushForceFactor
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
Impulse strength applied to a physics object the instant this character first bumps into it while blocked.
Caveats & Gotchas
- • Has no effect unless bEnablePhysicsInteraction is enabled.
- • This is a one-off impulse on first contact — sustained contact force is instead governed by PushForceFactor.
- • If bPushForceScaledToMass is enabled, the effective impulse also scales with the target object's mass.
Signature
float InitialPushForceFactor; Example
Give an initial shove on impact C++
if (UCharacterMovementComponent* MoveComp = GetCharacterMovement())
{
MoveComp->bEnablePhysicsInteraction = true;
MoveComp->InitialPushForceFactor = 500.0f;
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?