UMovementComponent::GetPenetrationAdjustment

Calculate a movement adjustment to try to move out of a penetration from a failed move.

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

UMovementComponent::GetPenetrationAdjustment()

UCharacterMovementComponent::GetPenetrationAdjustment()

References

Module

Engine

Header

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

Include

#include "GameFramework/MovementComponent.h"

Source

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

Syntax

virtual FVector GetPenetrationAdjustment
(
    const FHitResult & Hit
) const

Remarks

Calculate a movement adjustment to try to move out of a penetration from a failed move.

Returns

The adjustment to use after a failed move, or a zero vector if no attempt should be made.

Parameters

Parameter

Description

Hit

the result of the failed move