UCharacterMovementComponent::GroundFriction
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
Friction applied while walking on the ground, controlling how quickly the character changes direction and how much it slides. Higher values grip the surface more; lower values feel slippery, like ice.
Caveats & Gotchas
- • If bUseSeparateBrakingFriction is false, this value also controls braking deceleration when Acceleration is zero, multiplied by BrakingFrictionFactor — it isn't purely a movement-control stat.
- • Clamped to a minimum of 0 in the editor (ClampMin/UIMin), but code can still assign negative values at runtime, which produces undefined movement behavior.
Signature
float GroundFriction Example
Simulate an icy surface C++
void AIcePatch::OnBeginOverlap(AActor* OtherActor)
{
if (ACharacter* Character = Cast<ACharacter>(OtherActor))
{
Character->GetCharacterMovement()->GroundFriction = 0.5f;
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?