Navigation
API > API/Plugins > API/Plugins/Mover
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UMoverComponent
- UCharacterMoverComponent
References
| Module | Mover |
| Header | /Engine/Plugins/Experimental/Mover/Source/Mover/Public/MoverComponent.h |
| Include | #include "MoverComponent.h" |
Syntax
UCLASS (BlueprintType, Meta=(BlueprintSpawnableComponent))
class UMoverComponent : public UActorComponent
Variables
| Type | Name | Description | |
|---|---|---|---|
| TSubclassOf< UActorComponent > | BackendClass | Specifies which supporting back end class should drive this Mover actor. | |
| TWeakInterfacePtr< IMoverBackendLiaisonInterface > | BackendLiaisonComp | ||
| FMoverDynamicBasedMovementTickFunction | BasedMovementTickFunction | Tick function that may be called anytime after this actor's movement step, useful as a way to support based movement on objects that are not | |
| FTransform | BaseVisualComponentTransform | Cached original offset from the visual component, used for cases where we want to move the visual component away from the root component (for smoothing, corrections, etc.) | |
| bool | bHasValidCachedState | ||
| bool | bHasValidCachedUsedInput | ||
| bool | bHasValidLastProducedInput | ||
| FMoverAuxStateContext | CachedLastAuxState | ||
| FMoverInputCmdContext | CachedLastProducedInputCmd | ||
| FMoverTimeStep | CachedLastSimTickTimeStep | ||
| FMoverSyncState | CachedLastSyncState | ||
| FMoverInputCmdContext | CachedLastUsedInputCmd | ||
| FMoverTimeStep | CachedNewestSimTickTimeStep | ||
| TObjectPtr< UObject > | InputProducer | Optional object for producing input cmds. | |
| TObjectPtr< UPrimitiveComponent > | MovementBaseDependency | ||
| TObjectPtr< UMovementMixer > | MovementMixer | Optional object for mixing proposed moves.Typically set at BeginPlay time. | |
| TMap< FName, TObjectPtr< UBaseMovementMode > > | MovementModes | ||
| FMover_OnMovementModeChanged | OnMovementModeChanged | Broadcast when a MovementMode has changed. Happens during a simulation tick if the mode changed that tick or when SetModeImmediately is used to change modes. | |
| FMover_OnPostMovement | OnPostMovement | Broadcast at the end of a simulation tick after movement has occurred, but allowing additions/modifications to the state. Not assignable as a BP event due to it having mutable parameters. | |
| FMover_OnPostSimRollback | OnPostSimulationRollback | Broadcast when a rollback has occurred, just before the next simulation tick occurs. | |
| FMover_OnPostSimTick | OnPostSimulationTick | Broadcast after each simulation tick and the state is finalized. | |
| FMover_OnPreSimTick | OnPreSimulationTick | Broadcast before each simulation tick. | |
| TArray< FMoverDataPersistence > | PersistentSyncStateDataTypes | List of types that should always be present in this actor's sync state | |
| TObjectPtr< USceneComponent > | PrimaryVisualComponent | The main visual component associated with this Mover actor, typically a mesh and typically parented to the UpdatedComponent. | |
| FMover_ProcessGeneratedMovement | ProcessGeneratedMovement | Broadcast after proposed movement has been generated. | |
| FOnWarpLocalspaceRootMotionWithContext | ProcessLocalRootMotionDelegate | Delegates used when converting local root motion to worldspace, allowing external systems to influence it (such as motion warping) | |
| FOnWarpWorldspaceRootMotionWithContext | ProcessWorldRootMotionDelegate | ||
| EMoverSmoothingMode | SmoothingMode | If enabled, the movement of the primary visual component will be smoothed via an offset from the root moving component. This is useful in fixed-tick simulations with variable rendering rates. | |
| FName | StartingMovementMode | Name of the first mode to start in when simulation begins. Must have a mapping in MovementModes. Only used during initialization. | |
| TArray< TObjectPtr< UBaseMovementModeTransition > > | Transitions | Transition checks that are always evaluated regardless of mode. Evaluated in order, stopping at the first successful transition check. Mode-owned transitions take precedence. */. | |
| TObjectPtr< UPrimitiveComponent > | UpdatedCompAsPrimitive | UpdatedComponent, cast as a UPrimitiveComponent. | |
| TObjectPtr< USceneComponent > | UpdatedComponent | This is the component that's actually being moved. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| UBaseMovementMode * | AddMovementModeFromClass
(
FName ModeName, |
Add a movement mode to available movement modes. Returns true if the movement mode was added successfully. Returns the mode that was made. | |
| bool | AddMovementModeFromObject
(
FName ModeName, |
Add a movement mode to available movement modes. Returns true if the movement mode was added successfully. | |
| void | BindProcessGeneratedMovement
(
FMover_ProcessGeneratedMovement ProcessGeneratedMovementEvent |
Binds event for processing movement after it has been generated. Allows for final modifications to proposed movement before it's executed. | |
| void | CancelModifierFromHandle
(
FMovementModifierHandle ModifierHandle |
Cancel any active or queued Modifiers with the handle passed in. | |
| FTransform | ConvertLocalRootMotionToWorld
(
const FTransform& LocalRootMotionTransform, |
Converts a local root motion transform to worldspace. | |
| void | FinalizeFrame
(
const FMoverSyncState* SyncState, |
Take output for simulation. Called by backend system. | |
| void | FinalizeSmoothingFrame
(
const FMoverSyncState* SyncState, |
Take smoothed simulation state. Called by backend system, if supported. | |
| const FLayeredMoveBase * | FindActiveLayeredMoveByType
(
const UScriptStruct* DataStructType |
Find an active layered move by type. Returns null if one wasn't found. | |
| const T * | Find a layered move of a specific type in this components active layered moves. | ||
| void | |||
| UBaseMovementMode * | FindMode_Mutable
(
const UClass* ByType, |
Find movement mode by type. Returns null if there is none of that type | |
| T * | FindMode_Mutable
(
bool bRequireExactClass |
||
| UBaseMovementMode * | FindMovementMode
(
TSubclassOf< UBaseMovementMode > MovementMode |
||
| const FMovementModifierBase * | FindMovementModifier
(
const FMovementModifierHandle& ModifierHandle |
Find movement modifier by it's handle. Returns nullptr if the modifier couldn't be found. | |
| const FMovementModifierBase * | FindMovementModifierByType
(
const UScriptStruct* DataStructType |
Find movement modifier by type (returns the first modifier it finds). Returns nullptr if the modifier couldn't be found. | |
| const T * | Find a movement modifier of a specific type in this components movement modifiers. | ||
| const IMovementSettingsInterface * | FindSharedSettings
(
const UClass* ByType |
Find settings object by type. Returns null if there is none of that type | |
| const T * | |||
| const UObject * | FindSharedSettings_BP
(
TSubclassOf< UObject > SharedSetting |
Find settings object by type. Returns null if there is none of that type | |
| T * | |||
| IMovementSettingsInterface * | FindSharedSettings_Mutable
(
const UClass* ByType |
Find mutable settings object by type. Returns null if there is none of that type | |
| UObject * | FindSharedSettings_Mutable_BP
(
TSubclassOf< UObject > SharedSetting |
Find mutable settings object by type. Returns null if there is none of that type | |
| TArray< FTrajectorySampleInfo > | GetFutureTrajectory
(
float FutureSeconds, |
Get a sampling of where the actor is projected to be in the future, based on a current state. | |
| FVector | Get the current acceleration due to gravity (cm/s^2) in worldspace. | ||
| const FMoverInputCmdContext & | Access the most recently-used inputs. Check @HasValidCachedInputCmd first. | ||
| const FMoverTimeStep & | Get the most recent TimeStep. | ||
| UPrimitiveComponent * | Get the current movement base. Null if there isn't one. | ||
| FName | Get the current movement base bone, NAME_None if there isn't one. | ||
| FVector | Get the intended movement direction in worldspace with magnitude (range 0-1) | ||
| const UBaseMovementMode * | Get the current movement mode. | ||
| FName | Get the current movement mode name. | ||
| const FPlanarConstraint & | Access the planar constraint that may be limiting movement direction. | ||
| TArray< FTrajectorySampleInfo > | GetPredictedTrajectory
(
FMoverPredictTrajectoryParams PredictionParams |
Get a sampling of where the actor is projected to be in the future, based on a current state. | |
| T * | Typed accessor to primary visual component. | ||
| USceneComponent * | Access the primary visual component of the actor. | ||
| const UMoverBlackboard * | Access the read-only version of the Mover's Blackboard. | ||
| UMoverBlackboard * | |||
| TArray< FString > | |||
| const FMoverSyncState & | GetSyncState () |
Access the most recent captured sync state. Check @HasValidCachedState first. | |
| FRotator | Get the orientation that the actor is moving towards. | ||
| USceneComponent * | Access the root component of the actor that our Mover simulation is moving. | ||
| T * | Typed accessor to root moving component. | ||
| FTransform | Get the transform of the root component that our Mover simulation is moving. | ||
| FVector | Get the normalized direction considered "up" in worldspace. Typically aligned with gravity, and typically determines the plane an actor tries to move along. | ||
| FVector | GetVelocity () |
Get the current velocity (units per second, worldspace) | |
| void | HandleImpact
(
FMoverOnImpactParams& ImpactParams |
Handle a blocking impact. | |
| bool | HasGameplayTag
(
FGameplayTag TagToFind, |
Check Mover systems for a gameplay tag. | |
| bool | Signals whether we have input data saved yet. If not, input queries will not be meaningful. | ||
| bool | Signals whether we have a sync state saved yet. If not, most queries will not be meaningful. | ||
| void | InitializeSimulationState
(
FMoverSyncState* OutSync, |
Seed initial values based on component's state. Called by backend system. | |
| bool | |||
| bool | IsModifierActiveOrQueued
(
const FMovementModifierHandle& ModifierHandle |
Checks if the modifier handle passed in is active or queued on this mover component. | |
| void | K2_FindActiveLayeredMove
(
bool& DidSucceed, |
Retrieves an active layered move, by writing to a target instance if it is the matching type. | |
| void | K2_FindMovementModifier
(
FMovementModifierHandle ModifierHandle, |
Retrieves Movement modifier by writing to a target instance if it is the matching type. | |
| void | K2_QueueInstantMovementEffect
(
const int32& EffectAsRawData |
Queue a Instant Movement Effect to start at the end of this frame or start of the next subtick - whichever happens first. | |
| void | K2_QueueLayeredMove
(
const int32& MoveAsRawData |
Queue a layered move to start during the next simulation frame. | |
| FMovementModifierHandle | K2_QueueMovementModifier
(
const int32& MoveAsRawData |
Queue a Movement Modifier to start during the next simulation frame. | |
| void | OnBeginOverlap
(
UPrimitiveComponent* OverlappedComp, |
Callbacks. | |
| void | OnHandleImpact
(
const FMoverOnImpactParams& ImpactParams |
||
| void | OnSimulationPreRollback
(
const FMoverSyncState* InvalidSyncState, |
Called when a rollback occurs, before the simulation state has been restored | |
| void | OnSimulationRollback
(
const FMoverSyncState* SyncState, |
Called when a rollback occurs, after the simulation state has been restored | |
| void | PhysicsVolumeChanged
(
APhysicsVolume* NewVolume |
||
| void | ProcessFirstSimTickAfterRollback
(
const FMoverTimeStep& TimeStep |
||
| void | ProduceInput
(
const int32 DeltaTimeMS, |
Get latest local input prior to simulation step. Called by backend system on owner's instance (autonomous or authority). | |
| void | Queue a Instant Movement Effect to take place at the end of this frame or start of the next subtick - whichever happens first. | ||
| void | QueueLayeredMove
(
TSharedPtr< FLayeredMoveBase > Move |
Queue a layered move to start during the next simulation frame. | |
| FMovementModifierHandle | QueueMovementModifier
(
TSharedPtr< FMovementModifierBase > Modifier |
Queue a Movement Modifier to start during the next simulation frame. | |
| void | QueueNextMode
(
FName DesiredModeName, |
Queue a movement mode change to occur during the next simulation frame. If bShouldReenter is true, then a mode change will occur even if already in that mode. | |
| void | Internal function to ensure SharedSettings array matches what's needed by the list of Movement Modes | ||
| bool | RemoveMovementMode
(
FName ModeName |
Removes a movement mode from available movement modes. Returns number of modes removed from the available movement modes. | |
| void | RestoreFrame
(
const FMoverSyncState* SyncState, |
Restore a previous frame prior to resimulating. Called by backend system. | |
| void | SetFrameStateFromContext
(
const FMoverSyncState* SyncState, |
Makes this component and owner actor reflect the state of a particular frame snapshot. | |
| void | SetGravityOverride
(
bool bOverrideGravity, |
Set gravity override, as a directional acceleration in worldspace. Gravity on Earth would be {x=0,y=0,z=-980}. | |
| void | SetPlanarConstraint
(
const FPlanarConstraint& InConstraint |
Sets planar constraint that can limit movement direction. | |
| void | SetPrimaryVisualComponent
(
USceneComponent* SceneComponent |
Sets this Mover actor's primary visual component. Must be a descendant of the updated component that acts as our movement root. | |
| void | SetUpdatedComponent
(
USceneComponent* NewUpdatedComponent |
Basic "Update Component/Ticking". | |
| void | SimulationTick
(
const FMoverTimeStep& InTimeStep, |
Primary movement simulation update. Given an starting state and timestep, produce a new state. Called by backend system. | |
| void | TickInterpolatedSimProxy
(
const FMoverTimeStep& TimeStep, |
This is an opportunity to run code on the code on the simproxy in interpolated mode - currently used to help activate and deactivate modifiers on the simproxy in interpolated mode. | |
| bool | TryGetFloorCheckHitResult
(
FHitResult& OutHitResult |
Access the most recent floor check hit result. | |
| void | Clears current bound event for processing movement after it has been generated. | ||
| void | UpdateBasedMovementScheduling
(
const FMoverTickEndData& SimOutput |
Internal function to perform post-sim scheduling to optionally support simple based movement | |
| void | |||
| bool | ValidateSetup
(
FDataValidationContext& ValidationErrors |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | BeginPlay () |
Begins Play for the component. | |
| void | Initializes the component. | ||
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | RegisterComponentTickFunctions
(
bool bRegister |
Virtual call chain to register all tick functions | |
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. | |
| void | Handle this component being Uninitialized. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| EDataValidationResult | IsDataValid
(
FDataValidationContext& Context |
Generic function to validate objects during changelist validations, etc. | |
| void | PostCDOCompiled
(
const FPostCDOCompiledContext& Context |
Called after the Blueprint compiler has finished generating the Class Default Object (CDO) for a class. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PostTransacted
(
const FTransactionObjectEvent& TransactionEvent |
Called after the object has been transacted in some way. | |
| void | PreSave
(
FObjectPreSaveContext ObjectSaveContext |
Presave function. |