Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UCharacterMovementComponent
Description
Compute the sweep result of the smaller capsule with radius specified by GetValidPerchRadius(), and return true if the sweep contacts a valid walkable normal within InMaxFloorDist of InHit.ImpactPoint. This may be used to determine if the capsule can or cannot stay at the current location if perched on the edge of a small ledge or unwalkable surface. Note: Only returns a valid result if ShouldComputePerchResult returned true for the supplied hit value.
| Name | ComputePerchResult |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h |
| Include Path | #include "GameFramework/CharacterMovementComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp |
virtual bool ComputePerchResult
(
const float TestRadius,
const FHitResult & InHit,
const float InMaxFloorDist,
FFindFloorResult & OutPerchFloorResult
) const
True if the current location is a valid spot at which to perch.
Parameters
| Name | Remarks |
|---|---|
| TestRadius | Radius to use for the sweep, usually GetValidPerchRadius(). |
| InHit | Result of the last sweep test before the query. |
| InMaxFloorDist | Max distance to floor allowed by perching, from the supplied contact point (InHit.ImpactPoint). |
| OutPerchFloorResult | Contains the result of the perch floor test. |