Navigation
API > API/Plugins > API/Plugins/Mover
Movement Modifier: Used to apply changes that indirectly influence the movement simulation, without proposing or executing any movement, but still in sync with the sim. Example usages: changing groups of settings, movement mode re-mappings, etc.
Note: Currently mover expects to only have one type of modifier active at a time. This can be fixed by extending the Matches function to check more than just type, but make sure anything used to compare is synced through the NetSerialize function.
| Name | FMovementModifierBase |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/Mover/Source/Mover/Public/MovementModifier.h |
| Include Path | #include "MovementModifier.h" |
Syntax
USTRUCT (BlueprintInternalUseOnly)
struct FMovementModifierBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMovementModifierBase() |
MovementModifier.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMovementModifierBase() |
MovementModifier.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DurationMs | float | This modifier will expire after a set amount of time if > 0. If 0, it will be ticked only once, regardless of time step. It will need to be manually ended if < 0. | MovementModifier.h |
|
| StartSimTimeMs | double | The simulation time this move first ticked (< 0 means it hasn't started yet) | MovementModifier.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
MovementModifier.h | ||
virtual FMovementModifierBase * Clone() |
MovementModifier.h | ||
void EndModifier
(
UMoverComponent* MoverComp, |
Ends this move, allowing any cleanup to occur. | MovementModifier.h | |
void EndModifier_Async
(
const FMovementModifierParams_Async& Params |
MovementModifier.h | ||
void GenerateHandle() |
MovementModifier.h | ||
FMovementModifierHandle GetHandle() |
MovementModifier.h | ||
virtual UScriptStruct * GetScriptStruct() |
MovementModifier.h | ||
virtual bool HasGameplayTag
(
FGameplayTag TagToFind, |
Check modifier for a gameplay tag. | MovementModifier.h | |
virtual bool IsFinished
(
double CurrentSimTimeMs |
Runtime query whether this modifier is finished and can be destroyed. | MovementModifier.h | |
virtual bool Matches
(
const FMovementModifierBase* Other |
Used to compare modifiers and check if they are the same instance of modifiers. | MovementModifier.h | |
virtual void NetSerialize
(
FArchive& Ar |
MovementModifier.h | ||
virtual void OnEnd
(
UMoverComponent* MoverComp, |
Fired when this modifier is deactivated. | MovementModifier.h | |
virtual void OnEnd_Async
(
const FMovementModifierParams_Async& Params |
MovementModifier.h | ||
virtual void OnPostMovement
(
UMoverComponent* MoverComp, |
Fired after a movement Substep | MovementModifier.h | |
virtual void OnPostMovement_Async
(
const FMovementModifierParams_Async& Params |
MovementModifier.h | ||
virtual void OnPreMovement
(
UMoverComponent* MoverComp, |
Fired just before a movement Substep | MovementModifier.h | |
virtual void OnPreMovement_Async
(
const FMovementModifierParams_Async& Params |
MovementModifier.h | ||
virtual void OnStart
(
UMoverComponent* MoverComp, |
Fired when this modifier is activated. | MovementModifier.h | |
virtual void OnStart_Async
(
const FMovementModifierParams_Async& Params |
Begin Async API The async API is used by the async friendly mover simulation class which is currently implemented in ChaosMover for async physics support. | MovementModifier.h | |
void OverwriteHandleIfInvalid
(
const FMovementModifierHandle& ValidModifierHandle |
Used to write to a valid handle to a invalid handle Currently used to write a local handle to modifiers that were added from a rollback so they don't have a handle yet This is done to avoid queueing a modifier again as a local client applies potential input | MovementModifier.h | |
void StartModifier
(
UMoverComponent* MoverComp, |
Kicks off this modifier, allowing any initialization to occur. | MovementModifier.h | |
void StartModifier_Async
(
const FMovementModifierParams_Async& Params |
MovementModifier.h | ||
virtual FString ToSimpleString() |
MovementModifier.h |