UCharacterMovementComponent::OutofWaterZ
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWriteAdvancedDisplay
Description
Upward velocity, in centimetres per second, applied to the character when it climbs out of water onto solid ground.
Caveats & Gotchas
- • Marked AdvancedDisplay in the header, so it's hidden from the default Details panel view unless advanced properties are shown.
- • Too small a value can leave the character stuck partially submerged at the water's edge instead of fully climbing out.
- • Too large a value produces a visible pop or hop when exiting water, similar in feel to a small automatic jump.
Signature
float OutofWaterZ; Example
Smooth the exit-water motion C++
if (UCharacterMovementComponent* MoveComp = GetCharacterMovement())
{
MoveComp->OutofWaterZ = 350.0f;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?