unreal.NavWalkingMode

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

Bases: BaseMovementMode

NavWalkingMode: a default movement mode for traversing surfaces and movement bases by using an active navmesh when moving the actor rather than collision checks. Note: This movement mode requires a NavMoverComponent be on the actor to function properly. This mode also contains some randomization to avoid navmesh look ups

happening at the same time (which is fine for AI characters running on the server) but may cause issues if used on autonomous proxies.

C++ Source:

  • Plugin: Mover

  • Module: Mover

  • File: NavWalkingMode.h

Editor Properties: (see get_editor_property/set_editor_property)

  • behavior_off_nav_mesh (OffNavMeshBehavior): [Read-Write] What should we do if we stray off the nav mesh?

  • gameplay_tags (GameplayTagContainer): [Read-Write] A list of gameplay tags associated with this movement mode

  • nav_mesh_projection_height_scale_down (float): [Read-Write] Scale of the total capsule height to use for projection from navmesh to underlying geometry in the downward direction. In other words, trace down to [CapsuleHeight * NavMeshProjectionHeightScaleDown] below nav mesh.

  • nav_mesh_projection_height_scale_up (float): [Read-Write] Scale of the total capsule height to use for projection from navmesh to underlying geometry in the upward direction. In other words, start the trace at [CapsuleHeight * NavMeshProjectionHeightScaleUp] above nav mesh.

  • nav_mesh_projection_interp_speed (float): [Read-Write] Speed at which to interpolate agent navmesh offset between traces. 0: Instant (no interp) > 0: Interp speed”)

  • nav_mesh_projection_interval (float): [Read-Write] How often we should raycast to project from navmesh to underlying geometry

  • nav_mover_component (NavMoverComponent): [Read-Write] Associated Movement component that will actually move the actor

  • project_nav_mesh_on_both_world_channels (bool): [Read-Write] Use both WorldStatic and WorldDynamic channels for NavWalking geometry conforming

  • project_nav_mesh_walking (bool): [Read-Write] Whether to raycast to underlying geometry to better conform navmesh-walking actors

  • shared_settings_classes (Array[type(Class)]): [Read-Write] Settings object type that this mode depends on. May be shared with other movement modes. When the mode is added to a Mover Component, it will create a shared instance of this settings class.

  • slide_along_nav_mesh_edge (bool): [Read-Write] If attempting to stray off the nav mesh, should we attempt to slide along the edge instead? See BehaviorOffNavMesh: for cases where a sliding move can’t be determined.

  • supports_async (bool): [Read-Write] Whether this movement mode supports being part of an asynchronous movement simulation (running concurrently with the gameplay thread) Specifically for the GenerateMove and SimulationTick functions

  • sweep_while_nav_walking (bool): [Read-Write] Whether or not the actor should sweep for collision geometry while walking.

  • transitions (Array[BaseMovementModeTransition]): [Read-Write] Transition checks for the current mode. Evaluated in order, stopping at the first successful transition check

  • turn_generator (Object): [Read-Write] Optional modular object for generating rotation towards desired orientation. If not specified, linear interpolation will be used.

property behavior_off_nav_mesh: OffNavMeshBehavior

[Read-Write] What should we do if we stray off the nav mesh?

Type:

(OffNavMeshBehavior)

get_turn_generator() Object

Returns the active turn generator. Note: you will need to cast the return value to the generator you expect to get, it can also be none

Return type:

Object

property nav_mesh_projection_height_scale_down: float

[Read-Write] Scale of the total capsule height to use for projection from navmesh to underlying geometry in the downward direction. In other words, trace down to [CapsuleHeight * NavMeshProjectionHeightScaleDown] below nav mesh.

Type:

(float)

property nav_mesh_projection_height_scale_up: float

[Read-Write] Scale of the total capsule height to use for projection from navmesh to underlying geometry in the upward direction. In other words, start the trace at [CapsuleHeight * NavMeshProjectionHeightScaleUp] above nav mesh.

Type:

(float)

property nav_mesh_projection_interp_speed: float

Instant (no interp) > 0: Interp speed”)

Type:

(float)

Type:

[Read-Write] Speed at which to interpolate agent navmesh offset between traces. 0

property nav_mesh_projection_interval: float

[Read-Write] How often we should raycast to project from navmesh to underlying geometry

Type:

(float)

property nav_mover_component: NavMoverComponent

[Read-Only] Associated Movement component that will actually move the actor

Type:

(NavMoverComponent)

property project_nav_mesh_on_both_world_channels: bool

[Read-Only] Use both WorldStatic and WorldDynamic channels for NavWalking geometry conforming

Type:

(bool)

property project_nav_mesh_walking: bool

[Read-Only] Whether to raycast to underlying geometry to better conform navmesh-walking actors

Type:

(bool)

set_turn_generator_class(turn_generator_class) None

Sets the active turn generator to use the class provided. Note: To set it back to the default implementation pass in none

Parameters:

turn_generator_class (type(Class))

property slide_along_nav_mesh_edge: bool

[Read-Write] If attempting to stray off the nav mesh, should we attempt to slide along the edge instead? See BehaviorOffNavMesh: for cases where a sliding move can’t be determined.

Type:

(bool)

property sweep_while_nav_walking: bool

[Read-Write] Whether or not the actor should sweep for collision geometry while walking.

Type:

(bool)