UCharacterMovementComponent::ApplyRequestedMove

Use velocity requested by path following to compute a requested acceleration and speed.

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 bool ApplyRequestedMove
(
    float DeltaTime,
    float MaxAccel,
    float MaxSpeed,
    float Friction,
    float BrakingDeceleration,
    FVector & OutAcceleration,
    float & OutRequestedSpeed
)

Remarks

Use velocity requested by path following to compute a requested acceleration and speed. This does not affect the Acceleration member variable, as that is used to indicate input acceleration. This may directly affect current Velocity.

Returns

Whether there is a requested velocity and acceleration, resulting in valid OutAcceleration and OutRequestedSpeed values.

Parameters

Parameter

Description

DeltaTime

Time slice for this operation

MaxAccel

Max acceleration allowed in OutAcceleration result.

MaxSpeed

Max speed allowed when computing OutRequestedSpeed.

Friction

Current friction.

BrakingDeceleration

Current braking deceleration.

OutAcceleration

Acceleration computed based on requested velocity.

OutRequestedSpeed

Speed of resulting velocity request, which can affect the max speed allowed by movement.