RealDocs

UCharacterMovementComponent::RepulsionForce

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

Description

Force per kilogram of mass applied continuously to every physics component currently overlapping the character, pushing them apart.

Caveats & Gotchas

  • Has no effect unless bEnablePhysicsInteraction is enabled.
  • Unlike TouchForceFactor and PushForceFactor, this applies every tick to all overlapping components at once, not just the one the character is blocked against.
  • Because it scales per kilogram, very heavy overlapping objects can end up receiving a large combined repulsion force.

Signature

float RepulsionForce;

Example

Keep overlapping physics props from clumping C++
if (UCharacterMovementComponent* MoveComp = GetCharacterMovement())
{
	MoveComp->bEnablePhysicsInteraction = true;
	MoveComp->RepulsionForce = 2.5f;
}

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.