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] Allow Client Side Navigation

  • 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] Data Gathering Mode

  • dirty_areas_update_freq (float): [Read-Write] update frequency for dirty areas on navmesh

  • 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] Should Discard Sub Level Nav Data

  • 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] Spawn Nav Data in Nav Bounds Level

  • supported_agents (Array(NavDataConfig)): [Read-Write] Supported Agents

  • tick_while_paused (bool): [Read-Write] Tick While Paused

crowd_manager_class

(Class) – [Read-Only] Crowd Manager Class

classmethod find_path_to_actor_synchronously(world_context_object, path_start, goal_actor, tether_distance=50.000000, 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_point_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_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
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) –
on_navigation_generation_finished_delegate

(OnNavDataGenericEvent) – [Read-Write] On Navigation Generation Finished Delegate

classmethod project_point_to_navigation(world_context_object, point, nav_data, filter_class, query_extent=[0.000000, 0.000000, 0.000000]) → 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.000000, tile_removal_radius=5000.000000) → 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) –