UCharacterMovementComponent::BrakingDecelerationSwimming
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
Deceleration applied while swimming when the character has no acceleration input, in centimetres per second squared.
Caveats & Gotchas
- • Only takes effect while MovementMode is MOVE_Swimming.
- • A value of 0 means the character keeps drifting at its current swim velocity indefinitely once input stops, since water friction is not otherwise modeled here.
- • This is analogous to BrakingDecelerationFalling and BrakingDecelerationFlying but applies only in the swimming movement mode.
Signature
float BrakingDecelerationSwimming; Example
Make swimming stop quickly when input is released C++
if (UCharacterMovementComponent* MoveComp = GetCharacterMovement())
{
MoveComp->BrakingDecelerationSwimming = 1000.0f;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?