Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/APawn
Description
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.
| Name | AddMovementInput |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Pawn.h |
| Include Path | #include "GameFramework/Pawn.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Pawn.cpp |
UFUNCTION (BlueprintCallable, Category="Pawn|Input", Meta=(Keywords="AddInput"))
virtual void AddMovementInput
(
FVector WorldDirection,
float ScaleValue,
bool bForce
)
Parameters
| Name | Remarks |
|---|---|
| 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
-
GetPendingMovementInputVector()
-
GetLastMovementInputVector()
-
ConsumeMovementInputVector()