UCharacterMovementComponent::FindFloor

Sweeps a vertical trace to find the floor for the capsule at the given location.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h

Include

#include "GameFramework/CharacterMovementComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp

Syntax

virtual void FindFloor
(
    const FVector & CapsuleLocation,
    FFindFloorResult & OutFloorResult,
    bool bCanUseCachedLocation,
    const FHitResult * DownwardSweepResult
) const

Remarks

Sweeps a vertical trace to find the floor for the capsule at the given location. Will attempt to perch if ShouldComputePerchResult() returns true for the downward sweep result. No floor will be found if collision is disabled on the capsule!

Parameters

Parameter

Description

CapsuleLocation

Location where the capsule sweep should originate

OutFloorResult

[Out] Contains the result of the floor check. The HitResult will contain the valid sweep or line test upon success, or the result of the sweep upon failure.

bCanUseCachedLocation

If true, may use a cached value (can be used to avoid unnecessary floor tests, if for example the capsule was not moving since the last test).

DownwardSweepResult

If non-null and it contains valid blocking hit info, this will be used as the result of a downward sweep test instead of doing it as part of the update.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss