unreal.NavMoverComponent

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

Bases: ActorComponent

NavMoverComponent: Responsible for implementing INavMoveInterface with UMoverComponent so pathfinding and other forms of navigation movement work. This component also caches the input given to it that is then consumed by the mover system. This component supports a basic version of the RVO avoidance interface to make it usable with Detour Crowd Avoidance. It does not support force based RVO avoidance, but this or child component would be a good place to update/evaluate Avoidance information and apply effects to the Mover Simulation. Note: This component relies on the parent actor having a MoverComponent as well. By default, this component only has a reference to MoverComponent meaning we use other ways (such as gameplay tags for the active movement mode) to check for state rather than calling specific functions on the active MoverComponent.

C++ Source:

  • Plugin: Mover

  • Module: Mover

  • File: NavMoverComponent.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.

  • avoidance_consideration_radius (float): [Read-Write]

  • avoidance_group (NavAvoidanceMask): [Read-Write] Moving actor’s group mask

  • avoidance_uid (int32): [Read-Only] No default value, for now it’s assumed to be valid if GetAvoidanceManager() returns non-NULL.

  • avoidance_weight (float): [Read-Write] De facto default value 0.5 (due to that being the default in the avoidance registration function), indicates RVO behavior.

  • 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

  • groups_to_avoid (NavAvoidanceMask): [Read-Write] Will avoid other agents if they are in one of specified groups

  • groups_to_ignore (NavAvoidanceMask): [Read-Write] Will NOT avoid other agents if they are in one of specified groups, higher priority than GroupsToAvoid

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

  • nav_agent_props (NavAgentProperties): [Read-Write] Properties that define how the component can move.

  • nav_movement_properties (NavMovementProperties): [Read-Write] associated properties for nav movement

  • 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

  • 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!

property avoidance_consideration_radius: float

[Read-Only]

Type:

(float)

property avoidance_group: NavAvoidanceMask

[Read-Only] Moving actor’s group mask

Type:

(NavAvoidanceMask)

property avoidance_uid: int

[Read-Only] No default value, for now it’s assumed to be valid if GetAvoidanceManager() returns non-NULL.

Type:

(int32)

property avoidance_weight: float

[Read-Only] De facto default value 0.5 (due to that being the default in the avoidance registration function), indicates RVO behavior.

Type:

(float)

consume_nav_movement_data() (out_move_input_intent=Vector, out_move_input_velocity=Vector) or None

Writes internal cached requested velocities to the MoveInput passed in. Returns true if it had move input to write.

Returns:

out_move_input_intent (Vector):

out_move_input_velocity (Vector):

Return type:

tuple or None

get_max_speed_for_nav_movement() float

Get the max speed of the movement component

Return type:

float

get_velocity_for_nav_movement() Vector

Get the current velocity of the movement component

Return type:

Vector

property groups_to_avoid: NavAvoidanceMask

[Read-Only] Will avoid other agents if they are in one of specified groups

Type:

(NavAvoidanceMask)

property groups_to_ignore: NavAvoidanceMask

[Read-Only] Will NOT avoid other agents if they are in one of specified groups, higher priority than GroupsToAvoid

Type:

(NavAvoidanceMask)

is_crouching() bool

Returns true if currently crouching

Return type:

bool

is_falling() bool

Returns true if currently falling (not flying, in a non-fluid volume, and not on the ground)

Return type:

bool

is_flying() bool

Returns true if currently flying (moving through a non-fluid volume without resting on the ground)

Return type:

bool

is_moving_on_ground() bool

Returns true if currently moving on the ground (e.g. walking or driving)

Return type:

bool

is_swimming() bool

Returns true if currently swimming (moving through a fluid volume)

Return type:

bool

property nav_movement_properties: NavMovementProperties

[Read-Write] associated properties for nav movement

Type:

(NavMovementProperties)

request_direct_move(move_velocity, force_max_speed) None

path following: request movement through a velocity directly

Parameters:
request_path_move(move_input) None

path following: request movement through a new move input (normal vector = full strength)

Parameters:

move_input (Vector)

set_avoidance_group_mask(group_mask) None

Set Avoidance Group Mask

Parameters:

group_mask (NavAvoidanceMask)

set_groups_to_avoid_mask(group_mask) None

Set Groups to Avoid Mask

Parameters:

group_mask (NavAvoidanceMask)

set_groups_to_ignore_mask(group_mask) None

Set Groups to Ignore Mask

Parameters:

group_mask (NavAvoidanceMask)

stop_active_movement() None

Stops applying further movement (usually zeros acceleration).

stop_movement_keep_pathing() None

Stops movement immediately (reset velocity) but keeps following current path