APawn::AddMovementInput

Add movement input along the given world direction vector (usually normalized) scaled by 'ScaleValue'.

Windows
MacOS
Linux

References

Module

Engine

Header

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

Include

#include "GameFramework/Pawn.h"

Source

/Engine/Source/Runtime/Engine/Private/Pawn.cpp

Syntax

virtual void AddMovementInput
(
    FVector WorldDirection,
    float ScaleValue,
    bool bForce
)

Remarks

Add movement input along the given world direction vector (usually normalized) scaled by 'ScaleValue'. If ScaleValue < 0, movement will be in the opposite direction. Base Pawn classes won't automatically apply movement, it's up to the user to do so in a Tick event. Subclasses such as Character and DefaultPawn automatically handle this input and move.

Parameters

Parameter

Description

WorldDirection

Direction in world space to apply input

ScaleValue

Scale to apply to input. This can be used for analog input, ie a value of 0.5 applies half the normal value, while -1.0 would reverse the direction.

bForce

If true always add the input, ignoring the result of IsMoveInputIgnored().

See Also

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