unreal.NavigationSystemV1

class unreal.NavigationSystemV1(outer=None, name='None')

Bases: unreal.NavigationSystemBase

Navigation System V1

C++ Source:

  • Module: NavigationSystem

  • File: NavigationSystem.h

Editor Properties: (see get_editor_property/set_editor_property)

  • active_tiles_update_interval (float): [Read-Write] Minimal time, in seconds, between active tiles set update

  • allow_client_side_navigation (bool): [Read-Write] If false, will not create nav collision when connecting as a client

  • auto_create_navigation_data (bool): [Read-Write] Should navigation system spawn default Navigation Data when there’s none and there are navigation bounds present?

  • crowd_manager_class (Class): [Read-Write] Crowd Manager Class

  • data_gathering_mode (NavDataGatheringModeConfig): [Read-Write] Sets how navigation data should be gathered when building collision information

  • default_agent_name (Name): [Read-Write] If not None indicates which of navigation datas and supported agents are going to be used as the default ones. If navigation agent of this type does not exist or is not enabled then the first available nav data will be used as the default one

  • dirty_area_warning_size_threshold (float): [Read-Write] -1 by default, if set to a positive value dirty areas with any dimensions in 2d over the threshold created at runtime will be logged

  • dirty_areas_update_freq (float): [Read-Write] Dirty Areas Update Freq

  • generate_navigation_only_around_navigation_invokers (bool): [Read-Write] If set to true navigation will be generated only around registered “navigation enforcers”

    This has a range of consequences (including how navigation octree operates) so it needs to be a conscious decision. Once enabled results in whole world being navigable.

    RegisterNavigationInvoker:

  • initial_building_locked (bool): [Read-Write] if set to true will result navigation system not rebuild navigation until

    a call to ReleaseInitialBuildingLock() is called. Does not influence editor-time generation (i.e. does influence PIE and Game). Defaults to false.

  • on_navigation_generation_finished_delegate (OnNavDataGenericEvent): [Read-Write] On Navigation Generation Finished Delegate

  • should_discard_sub_level_nav_data (bool): [Read-Write] If true, games should ignore navigation data inside loaded sublevels

  • skip_agent_height_check_when_picking_nav_data (bool): [Read-Write] false by default, if set to true will result in not caring about nav agent height

    when trying to match navigation data to passed in nav agent

  • spawn_nav_data_in_nav_bounds_level (bool): [Read-Write] If true will try to spawn the navigation data instance in the sublevel with navigation bounds, if false it will spawn in the persistent level

  • supported_agents (Array(NavDataConfig)): [Read-Write] List of agents types supported by this navigation system

  • supported_agents_mask (NavAgentSelector): [Read-Write] NavigationSystem’s properties in Project Settings define all possible supported agents,

    but a specific navigation system can choose to support only a subset of agents. Set via NavigationSystemConfig

  • tick_while_paused (bool): [Read-Write] If true, will update navigation even when the game is paused

property crowd_manager_class

[Read-Only] Crowd Manager Class

Type

(Class)

property default_agent_name

[Read-Only] If not None indicates which of navigation datas and supported agents are going to be used as the default ones. If navigation agent of this type does not exist or is not enabled then the first available nav data will be used as the default one

Type

(Name)

classmethod find_path_to_actor_synchronously(world_context_object, path_start, goal_actor, tether_distance=50.0, pathfinding_context=None, filter_class=None)NavigationPath
Finds path instantly, in a FindPath Synchronously. Main advantage over FindPathToLocationSynchronously is that

the resulting path will automatically get updated if goal actor moves more than TetherDistance away from last path node

Parameters
  • world_context_object (Object) –

  • path_start (Vector) –

  • goal_actor (Actor) –

  • tether_distance (float) –

  • pathfinding_context (Actor) – could be one of following: NavigationData (like Navmesh actor), Pawn or Controller. This parameter determines parameters of specific pathfinding query

  • filter_class (type(Class)) –

Returns

Return type

NavigationPath

classmethod find_path_to_location_synchronously(world_context_object, path_start, path_end, pathfinding_context=None, filter_class=None)NavigationPath

Finds path instantly, in a FindPath Synchronously.

Parameters
  • world_context_object (Object) –

  • path_start (Vector) –

  • path_end (Vector) –

  • pathfinding_context (Actor) – could be one of following: NavigationData (like Navmesh actor), Pawn or Controller. This parameter determines parameters of specific pathfinding query

  • filter_class (type(Class)) –

Returns

Return type

NavigationPath

classmethod get_navigation_system(world_context_object)NavigationSystemV1

Blueprint functions

Parameters

world_context_object (Object) –

Returns

Return type

NavigationSystemV1

classmethod get_path_cost(world_context_object, path_start, path_end, nav_data=None, filter_class=None) -> (NavigationQueryResult, path_cost=float)

Potentially expensive. Use with caution. Consider using UPathFollowingComponent::GetRemainingPathCost instead

Parameters
Returns

path_cost (float):

Return type

float

classmethod get_path_length(world_context_object, path_start, path_end, nav_data=None, filter_class=None) -> (NavigationQueryResult, path_length=float)

Potentially expensive. Use with caution

Parameters
Returns

path_length (float):

Return type

float

classmethod get_random_location_in_navigable_radius(world_context_object, origin, radius, nav_data=None, filter_class=None) → Vector or None

Generates a random location in navigable space within given radius of Origin.

Parameters
Returns

Return Value represents if the call was successful

random_location (Vector):

Return type

Vector or None

classmethod get_random_point_in_navigable_radius(world_context_object, origin, radius, nav_data=None, filter_class=None) → Vector or None

K2 Get Random Point in Navigable Radius

Parameters
Returns

random_location (Vector):

Return type

Vector or None

classmethod get_random_reachable_point_in_radius(world_context_object, origin, radius, nav_data=None, filter_class=None) → Vector or None

Generates a random location reachable from given Origin location.

Parameters
Returns

Return Value represents if the call was successful

random_location (Vector):

Return type

Vector or None

classmethod is_navigation_being_built(world_context_object)bool

Is Navigation Being Built

Parameters

world_context_object (Object) –

Returns

Return type

bool

classmethod is_navigation_being_built_or_locked(world_context_object)bool

Is Navigation Being Built or Locked

Parameters

world_context_object (Object) –

Returns

Return type

bool

k2_replace_area_in_octree_data(object, old_area, new_area)bool

K2 Replace Area in Octree Data

Parameters
Returns

Return type

bool

classmethod navigation_raycast(world_context_object, ray_start, ray_end, filter_class=None, querier=None) → Vector or None

Performs navigation raycast on NavigationData appropriate for given Querier.

Parameters
  • world_context_object (Object) –

  • ray_start (Vector) –

  • ray_end (Vector) –

  • filter_class (type(Class)) –

  • querier (Controller) – if not passed default navigation data will be used

Returns

true if line from RayStart to RayEnd was obstructed. Also, true when no navigation data present

hit_location (Vector): if line was obstructed this will be set to hit location. Otherwise it contains SegmentEnd

Return type

Vector or None

on_navigation_bounds_updated(nav_volume)None

document:

Parameters

nav_volume (NavMeshBoundsVolume) –

property on_navigation_generation_finished_delegate

[Read-Write] On Navigation Generation Finished Delegate

Type

(OnNavDataGenericEvent)

classmethod project_point_to_navigation(world_context_object, point, nav_data, filter_class, query_extent=[0.0, 0.0, 0.0]) → Vector or None

Project a point onto the NavigationData

Parameters
Returns

projected_location (Vector):

Return type

Vector or None

register_navigation_invoker(invoker, tile_generation_radius=3000.0, tile_removal_radius=5000.0)None
Registers given actor as a “navigation enforcer” which means navigation system will

make sure navigation is being generated in specified radius around it.

you need NavigationSystem’s GenerateNavigationOnlyAroundNavigationInvokers to be set to true to take advantage of this feature:

Parameters
  • invoker (Actor) –

  • tile_generation_radius (float) –

  • tile_removal_radius (float) –

reset_max_simultaneous_tile_generation_jobs_count()None

Brings limit of simultaneous navmesh tile generation jobs back to Project Setting’s default value

set_geometry_gathering_mode(new_mode)None

Set Geometry Gathering Mode

Parameters

new_mode (NavDataGatheringModeConfig) –

set_max_simultaneous_tile_generation_jobs_count(max_number_of_jobs)None

will limit the number of simultaneously running navmesh tile generation jobs to specified number.

Parameters

max_number_of_jobs (int32) – gets trimmed to be at least 1. You cannot use this function to pause navmesh generation

unregister_navigation_invoker(invoker)None

Removes given actor from the list of active navigation enforcers. RegisterNavigationInvoker for more details:

Parameters

invoker (Actor) –