UCharacterMovementComponent::MaintainHorizontalGroundVelocity

Adjusts velocity when walking so that Z velocity is zero.

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 void MaintainHorizontalGroundVelocity()

Remarks

Adjusts velocity when walking so that Z velocity is zero. When bMaintainHorizontalGroundVelocity is false, also rescales the velocity vector to maintain the original magnitude, but in the horizontal direction.