UCharacterMovementComponent::MaxSwimSpeed
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
The maximum speed the character can reach while swimming, in centimetres per second.
Caveats & Gotchas
- • Only applies once MovementMode is set to MOVE_Swimming — it has no effect on walking, falling, or flying speed.
- • Actual swim speed is also affected by Buoyancy and the character's current input, so characters won't always reach this cap.
Signature
float MaxSwimSpeed; Example
Set a faster swim speed C++
if (UCharacterMovementComponent* MoveComp = GetCharacterMovement())
{
MoveComp->MaxSwimSpeed = 400.0f;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?