unreal.MoverComponent

class unreal.MoverComponent(outer: Object | None = None, name: Name | str = 'None')

Bases: ActorComponent

Mover Component

C++ Source:

  • Plugin: Mover

  • Module: Mover

  • File: MoverComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • asset_user_data_editor_only (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.

  • backend_class (type(Class)): [Read-Write] Specifies which supporting back end class should drive this Mover actor

  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation

  • component_tags (Array[Name]): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class

  • gravity_accel_override (Vector): [Read-Write] cm/s^2, only meaningful if bHasGravityOverride: is enabled. Set SetGravityOverride:

  • has_gravity_override (bool): [Read-Write] Whether or not gravity is overridden on this actor. Otherwise, fall back on world settings. See SetGravityOverride:

  • input_producer (Object): [Read-Write] Optional object for producing input cmds. Typically set at BeginPlay time. If not specified, defaulted input will be used.

  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds

  • movement_mixer (MovementMixer): [Read-Write] Optional object for mixing proposed moves.Typically set at BeginPlay time. If not specified, UDefaultMovementMixer will be used.

  • movement_modes (Map[Name, BaseMovementMode]): [Read-Write]

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated

  • on_movement_mode_changed (Mover_OnMovementModeChanged): [Read-Write] 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.

  • on_post_simulation_rollback (Mover_OnPostSimRollback): [Read-Write] Broadcast when a rollback has occurred, just before the next simulation tick occurs

  • on_post_simulation_tick (Mover_OnPostSimTick): [Read-Write] Broadcast after each simulation tick and the state is finalized

  • on_pre_simulation_tick (Mover_OnPreSimTick): [Read-Write] Broadcast before each simulation tick

  • persistent_sync_state_data_types (Array[MoverDataPersistence]): [Read-Write] List of types that should always be present in this actor’s sync state

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component

  • replicate_using_registered_sub_object_list (bool): [Read-Write] When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.

  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

  • shared_settings (Array[Object]): [Read-Write] Collection of settings objects that are shared between movement modes. This list is automatically managed based on the MovementModes: contents.

  • starting_movement_mode (Name): [Read-Write] Name of the first mode to start in when simulation begins. Must have a mapping in MovementModes. Only used during initialization.

  • supports_kinematic_based_movement (bool): [Read-Write] If enabled, this actor will be moved to follow a base actor that it’s standing on. Typically disabled for physics-based movement, which handles based movement internally.

  • transitions (Array[BaseMovementModeTransition]): [Read-Write] Transition checks that are always evaluated regardless of mode. Evaluated in order, stopping at the first successful transition check. Mode-owned transitions take precedence. */

add_movement_mode_from_class(mode_name, movement_mode) BaseMovementMode

Add a movement mode to available movement modes. Returns true if the movement mode was added successfully. Returns the mode that was made.

Parameters:
Return type:

BaseMovementMode

add_movement_mode_from_object(mode_name, movement_mode) bool

Add a movement mode to available movement modes. Returns true if the movement mode was added successfully

Parameters:
Return type:

bool

find_movement_mode(movement_mode) BaseMovementMode

Find Movement Mode

Parameters:

movement_mode (type(Class)) –

Return type:

BaseMovementMode

find_shared_settings_bp(shared_setting) Object

Find settings object by type. Returns null if there is none of that type

Parameters:

shared_setting (type(Class)) –

Return type:

Object

find_shared_settings_mutable_bp(shared_setting) Object

Find mutable settings object by type. Returns null if there is none of that type

Parameters:

shared_setting (type(Class)) –

Return type:

Object

get_future_trajectory(future_seconds, samples_per_second) Array[TrajectorySampleInfo]

Get a sampling of where the actor is projected to be in the future, based on a current state. Note that this is projecting ideal movement without doing full simulation and collision.

Parameters:
  • future_seconds (float) –

  • samples_per_second (float) –

Return type:

Array[TrajectorySampleInfo]

get_gravity_acceleration() Vector

Get the current acceleration due to gravity (cm/s^2) in worldspace

Return type:

Vector

get_last_input_cmd() MoverInputCmdContext

Access the most recently-used inputs. Check HasValidCachedInputCmd: first.

Return type:

MoverInputCmdContext

get_movement_base() PrimitiveComponent

Get the current movement base. Null if there isn’t one.

Return type:

PrimitiveComponent

get_movement_base_bone_name() Name

Get the current movement base bone, NAME_None if there isn’t one.

Return type:

Name

get_movement_intent() Vector

Get the intended movement direction in worldspace with magnitude (range 0-1)

Return type:

Vector

get_movement_mode_name() Name

Get the current movement mode name

Return type:

Name

get_sim_blackboard() MoverBlackboard

Access the read-only version of the Mover’s Blackboard

Return type:

MoverBlackboard

get_sync_state() MoverSyncState

Access the most recent captured sync state. Check HasValidCachedState: first.

Return type:

MoverSyncState

get_target_orientation() Rotator

Get the orientation that the actor is moving towards

Return type:

Rotator

get_up_direction() Vector

Get the normalized direction considered “up” in worldspace. Typically aligned with gravity, and typically determines the plane an actor tries to move along.

Return type:

Vector

get_velocity() Vector

Get the current velocity (units per second, worldspace)

Return type:

Vector

handle_impact() MoverOnImpactParams

Handle a blocking impact.

Returns:

impact_params (MoverOnImpactParams):

Return type:

MoverOnImpactParams

has_valid_cached_input_cmd() bool

Signals whether we have input data saved yet. If not, input queries will not be meaningful.

Return type:

bool

has_valid_cached_state() bool

Signals whether we have a sync state saved yet. If not, most queries will not be meaningful.

Return type:

bool

property input_producer: Object

[Read-Write] Optional object for producing input cmds. Typically set at BeginPlay time. If not specified, defaulted input will be used.

Type:

(Object)

property movement_mixer: MovementMixer

[Read-Write] Optional object for mixing proposed moves.Typically set at BeginPlay time. If not specified, UDefaultMovementMixer will be used.

Type:

(MovementMixer)

property movement_modes: None

[Read-Only]

Type:

(Map[Name, BaseMovementMode])

property on_movement_mode_changed: Mover_OnMovementModeChanged

[Read-Write] 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.

Type:

(Mover_OnMovementModeChanged)

property on_post_simulation_rollback: Mover_OnPostSimRollback

[Read-Write] Broadcast when a rollback has occurred, just before the next simulation tick occurs

Type:

(Mover_OnPostSimRollback)

property on_post_simulation_tick: Mover_OnPostSimTick

[Read-Write] Broadcast after each simulation tick and the state is finalized

Type:

(Mover_OnPostSimTick)

property on_pre_simulation_tick: Mover_OnPreSimTick

[Read-Write] Broadcast before each simulation tick

Type:

(Mover_OnPreSimTick)

property persistent_sync_state_data_types: None

[Read-Write] List of types that should always be present in this actor’s sync state

Type:

(Array[MoverDataPersistence])

queue_next_mode(desired_mode_name, should_reenter=False) None

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.

Parameters:
  • desired_mode_name (Name) –

  • should_reenter (bool) –

remove_movement_mode(mode_name) bool

Removes a movement mode from available movement modes. Returns number of modes removed from the available movement modes.

Parameters:

mode_name (Name) –

Return type:

bool

set_gravity_override(override_gravity, gravity_acceleration=[0.000000, 0.000000, 0.000000]) None

Set gravity override, as a directional acceleration in worldspace. Gravity on Earth would be {x=0,y=0,z=-980}

Parameters:
  • override_gravity (bool) –

  • gravity_acceleration (Vector) –

property starting_movement_mode: Name

[Read-Only] Name of the first mode to start in when simulation begins. Must have a mapping in MovementModes. Only used during initialization.

Type:

(Name)

property transitions: None

[Read-Write] Transition checks that are always evaluated regardless of mode. Evaluated in order, stopping at the first successful transition check. Mode-owned transitions take precedence. */

Type:

(Array[BaseMovementModeTransition])

try_get_floor_check_hit_result() HitResult or None

Access the most recent floor check hit result.

Returns:

out_hit_result (HitResult):

Return type:

HitResult or None