UCharacterMovementComponent::ComputeGroundMovementDelta

Compute a vector of movement, given a delta and a hit result of the surface we are on.

Choose your operating system:

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 FVector ComputeGroundMovementDelta
(
    const FVector & Delta,
    const FHitResult & RampHit,
    const bool bHitFromLineTrace
) const

Remarks

Compute a vector of movement, given a delta and a hit result of the surface we are on.

Returns

If on a walkable surface, this returns a vector that moves parallel to the surface. The magnitude may be scaled if bMaintainHorizontalGroundVelocity is true. If a ramp vector can't be computed, this will just return Delta.

Parameters

Parameter

Description

Delta

Attempted movement direction

RampHit

Hit result of sweep that found the ramp below the capsule

bHitFromLineTrace

Whether the floor trace came from a line trace