UCharacterMovementComponent::GetValidPerchRadius
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns the radius within which the character can stand on the edge of a walkable surface without falling, computed as the capsule radius minus GetPerchRadiusThreshold().
Caveats & Gotchas
- • Returns 0 if CharacterOwner is null, since it needs the owner's capsule component to read the scaled radius.
- • Clamped between 0.11 and the full capsule radius, so it never returns exactly 0 for a valid character even if PerchRadiusThreshold is configured larger than the capsule radius.
Signature
float GetValidPerchRadius() const Return Type
float Example
Read the valid perch radius C++
const float PerchRadius = GetCharacterMovement()->GetValidPerchRadius(); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?