Struct NavigationServer3D
#[repr(C)]pub struct NavigationServer3D { /* private fields */ }
experimental-godot-api
only.Expand description
Godot class NavigationServer3D.
Inherits Object
.
Related symbols:
navigation_server_3d
: sidecar module with related enum/flag typesINavigationServer3D
: virtual methods
See also Godot docs for NavigationServer3D
.
§Singleton
This class is a singleton. You can get the one instance using NavigationServer3D::singleton()
.
Implementations§
pub fn singleton() -> Gd<NavigationServer3D>
pub fn get_maps(&self) -> Array<Rid>
pub fn map_create(&mut self) -> Rid
pub fn map_set_active(&mut self, map: Rid, active: bool)
pub fn map_is_active(&self, map: Rid) -> bool
pub fn map_set_up(&mut self, map: Rid, up: Vector3)
pub fn map_get_up(&self, map: Rid) -> Vector3
pub fn map_set_cell_size(&mut self, map: Rid, cell_size: f32)
pub fn map_get_cell_size(&self, map: Rid) -> f32
pub fn map_set_cell_height(&mut self, map: Rid, cell_height: f32)
pub fn map_get_cell_height(&self, map: Rid) -> f32
pub fn map_set_merge_rasterizer_cell_scale(&mut self, map: Rid, scale: f32)
pub fn map_get_merge_rasterizer_cell_scale(&self, map: Rid) -> f32
pub fn map_set_use_edge_connections(&mut self, map: Rid, enabled: bool)
pub fn map_get_use_edge_connections(&self, map: Rid) -> bool
pub fn map_set_edge_connection_margin(&mut self, map: Rid, margin: f32)
pub fn map_get_edge_connection_margin(&self, map: Rid) -> f32
pub fn map_set_link_connection_radius(&mut self, map: Rid, radius: f32)
pub fn map_get_link_connection_radius(&self, map: Rid) -> f32
pub fn map_get_path(
&self,
map: Rid,
origin: Vector3,
destination: Vector3,
optimize: bool,
) -> PackedVector3Array
pub fn map_get_path( &self, map: Rid, origin: Vector3, destination: Vector3, optimize: bool, ) -> PackedVector3Array
To set the default parameters, use Self::map_get_path_ex
and its builder methods. See the book for detailed usage instructions.
pub fn map_get_path_ex<'a>( &'a self, map: Rid, origin: Vector3, destination: Vector3, optimize: bool, ) -> ExMapGetPath<'a>
pub fn map_get_closest_point_to_segment(
&self,
map: Rid,
start: Vector3,
end: Vector3,
) -> Vector3
pub fn map_get_closest_point_to_segment( &self, map: Rid, start: Vector3, end: Vector3, ) -> Vector3
To set the default parameters, use Self::map_get_closest_point_to_segment_ex
and its builder methods. See the book for detailed usage instructions.
pub fn map_get_closest_point_to_segment_ex<'a>( &'a self, map: Rid, start: Vector3, end: Vector3, ) -> ExMapGetClosestPointToSegment<'a>
pub fn map_get_closest_point(&self, map: Rid, to_point: Vector3) -> Vector3
pub fn map_get_closest_point_normal( &self, map: Rid, to_point: Vector3, ) -> Vector3
pub fn map_get_closest_point_owner(&self, map: Rid, to_point: Vector3) -> Rid
pub fn map_get_links(&self, map: Rid) -> Array<Rid>
pub fn map_get_regions(&self, map: Rid) -> Array<Rid>
pub fn map_get_agents(&self, map: Rid) -> Array<Rid>
pub fn map_get_obstacles(&self, map: Rid) -> Array<Rid>
pub fn map_force_update(&mut self, map: Rid)
pub fn map_get_iteration_id(&self, map: Rid) -> u32
pub fn map_get_random_point( &self, map: Rid, navigation_layers: u32, uniformly: bool, ) -> Vector3
pub fn query_path( &self, parameters: impl AsObjectArg<NavigationPathQueryParameters3D>, result: impl AsObjectArg<NavigationPathQueryResult3D>, )
pub fn region_create(&mut self) -> Rid
pub fn region_set_enabled(&mut self, region: Rid, enabled: bool)
pub fn region_get_enabled(&self, region: Rid) -> bool
pub fn region_set_use_edge_connections(&mut self, region: Rid, enabled: bool)
pub fn region_get_use_edge_connections(&self, region: Rid) -> bool
pub fn region_set_enter_cost(&mut self, region: Rid, enter_cost: f32)
pub fn region_get_enter_cost(&self, region: Rid) -> f32
pub fn region_set_travel_cost(&mut self, region: Rid, travel_cost: f32)
pub fn region_get_travel_cost(&self, region: Rid) -> f32
pub fn region_set_owner_id(&mut self, region: Rid, owner_id: u64)
pub fn region_get_owner_id(&self, region: Rid) -> u64
pub fn region_owns_point(&self, region: Rid, point: Vector3) -> bool
pub fn region_set_map(&mut self, region: Rid, map: Rid)
pub fn region_get_map(&self, region: Rid) -> Rid
pub fn region_set_transform(&mut self, region: Rid, transform: Transform3D)
pub fn region_get_transform(&self, region: Rid) -> Transform3D
pub fn region_get_connections_count(&self, region: Rid) -> i32
pub fn region_get_connection_pathway_start( &self, region: Rid, connection: i32, ) -> Vector3
pub fn region_get_connection_pathway_end( &self, region: Rid, connection: i32, ) -> Vector3
pub fn region_get_random_point( &self, region: Rid, navigation_layers: u32, uniformly: bool, ) -> Vector3
pub fn link_create(&mut self) -> Rid
pub fn link_set_map(&mut self, link: Rid, map: Rid)
pub fn link_get_map(&self, link: Rid) -> Rid
pub fn link_set_enabled(&mut self, link: Rid, enabled: bool)
pub fn link_get_enabled(&self, link: Rid) -> bool
pub fn link_set_bidirectional(&mut self, link: Rid, bidirectional: bool)
pub fn link_is_bidirectional(&self, link: Rid) -> bool
pub fn link_set_start_position(&mut self, link: Rid, position: Vector3)
pub fn link_get_start_position(&self, link: Rid) -> Vector3
pub fn link_set_end_position(&mut self, link: Rid, position: Vector3)
pub fn link_get_end_position(&self, link: Rid) -> Vector3
pub fn link_set_enter_cost(&mut self, link: Rid, enter_cost: f32)
pub fn link_get_enter_cost(&self, link: Rid) -> f32
pub fn link_set_travel_cost(&mut self, link: Rid, travel_cost: f32)
pub fn link_get_travel_cost(&self, link: Rid) -> f32
pub fn link_set_owner_id(&mut self, link: Rid, owner_id: u64)
pub fn link_get_owner_id(&self, link: Rid) -> u64
pub fn agent_create(&mut self) -> Rid
pub fn agent_set_avoidance_enabled(&mut self, agent: Rid, enabled: bool)
pub fn agent_get_avoidance_enabled(&self, agent: Rid) -> bool
pub fn agent_set_use_3d_avoidance(&mut self, agent: Rid, enabled: bool)
pub fn agent_get_use_3d_avoidance(&self, agent: Rid) -> bool
pub fn agent_set_map(&mut self, agent: Rid, map: Rid)
pub fn agent_get_map(&self, agent: Rid) -> Rid
pub fn agent_set_paused(&mut self, agent: Rid, paused: bool)
pub fn agent_get_paused(&self, agent: Rid) -> bool
pub fn agent_set_neighbor_distance(&mut self, agent: Rid, distance: f32)
pub fn agent_get_neighbor_distance(&self, agent: Rid) -> f32
pub fn agent_set_max_neighbors(&mut self, agent: Rid, count: i32)
pub fn agent_get_max_neighbors(&self, agent: Rid) -> i32
pub fn agent_set_time_horizon_agents(&mut self, agent: Rid, time_horizon: f32)
pub fn agent_get_time_horizon_agents(&self, agent: Rid) -> f32
pub fn agent_set_time_horizon_obstacles( &mut self, agent: Rid, time_horizon: f32, )
pub fn agent_get_time_horizon_obstacles(&self, agent: Rid) -> f32
pub fn agent_set_radius(&mut self, agent: Rid, radius: f32)
pub fn agent_get_radius(&self, agent: Rid) -> f32
pub fn agent_set_height(&mut self, agent: Rid, height: f32)
pub fn agent_get_height(&self, agent: Rid) -> f32
pub fn agent_set_max_speed(&mut self, agent: Rid, max_speed: f32)
pub fn agent_get_max_speed(&self, agent: Rid) -> f32
pub fn agent_set_velocity_forced(&mut self, agent: Rid, velocity: Vector3)
pub fn agent_set_velocity(&mut self, agent: Rid, velocity: Vector3)
pub fn agent_get_velocity(&self, agent: Rid) -> Vector3
pub fn agent_set_position(&mut self, agent: Rid, position: Vector3)
pub fn agent_get_position(&self, agent: Rid) -> Vector3
pub fn agent_is_map_changed(&self, agent: Rid) -> bool
pub fn agent_set_avoidance_callback(&mut self, agent: Rid, callback: Callable)
pub fn agent_has_avoidance_callback(&self, agent: Rid) -> bool
pub fn agent_set_avoidance_layers(&mut self, agent: Rid, layers: u32)
pub fn agent_get_avoidance_layers(&self, agent: Rid) -> u32
pub fn agent_set_avoidance_mask(&mut self, agent: Rid, mask: u32)
pub fn agent_get_avoidance_mask(&self, agent: Rid) -> u32
pub fn agent_set_avoidance_priority(&mut self, agent: Rid, priority: f32)
pub fn agent_get_avoidance_priority(&self, agent: Rid) -> f32
pub fn obstacle_create(&mut self) -> Rid
pub fn obstacle_set_avoidance_enabled(&mut self, obstacle: Rid, enabled: bool)
pub fn obstacle_get_avoidance_enabled(&self, obstacle: Rid) -> bool
pub fn obstacle_set_use_3d_avoidance(&mut self, obstacle: Rid, enabled: bool)
pub fn obstacle_get_use_3d_avoidance(&self, obstacle: Rid) -> bool
pub fn obstacle_set_map(&mut self, obstacle: Rid, map: Rid)
pub fn obstacle_get_map(&self, obstacle: Rid) -> Rid
pub fn obstacle_set_paused(&mut self, obstacle: Rid, paused: bool)
pub fn obstacle_get_paused(&self, obstacle: Rid) -> bool
pub fn obstacle_set_radius(&mut self, obstacle: Rid, radius: f32)
pub fn obstacle_get_radius(&self, obstacle: Rid) -> f32
pub fn obstacle_set_height(&mut self, obstacle: Rid, height: f32)
pub fn obstacle_get_height(&self, obstacle: Rid) -> f32
pub fn obstacle_set_velocity(&mut self, obstacle: Rid, velocity: Vector3)
pub fn obstacle_get_velocity(&self, obstacle: Rid) -> Vector3
pub fn obstacle_set_position(&mut self, obstacle: Rid, position: Vector3)
pub fn obstacle_get_position(&self, obstacle: Rid) -> Vector3
pub fn obstacle_set_vertices( &mut self, obstacle: Rid, vertices: &PackedVector3Array, )
pub fn obstacle_get_vertices(&self, obstacle: Rid) -> PackedVector3Array
pub fn obstacle_set_avoidance_layers(&mut self, obstacle: Rid, layers: u32)
pub fn obstacle_get_avoidance_layers(&self, obstacle: Rid) -> u32
pub fn parse_source_geometry_data(
&mut self,
navigation_mesh: impl AsObjectArg<NavigationMesh>,
source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>,
root_node: impl AsObjectArg<Node>,
)
pub fn parse_source_geometry_data( &mut self, navigation_mesh: impl AsObjectArg<NavigationMesh>, source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>, root_node: impl AsObjectArg<Node>, )
To set the default parameters, use Self::parse_source_geometry_data_ex
and its builder methods. See the book for detailed usage instructions.
pub fn parse_source_geometry_data_ex<'a>( &'a mut self, navigation_mesh: impl AsObjectArg<NavigationMesh>, source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>, root_node: impl AsObjectArg<Node>, ) -> ExParseSourceGeometryData<'a>
pub fn bake_from_source_geometry_data(
&mut self,
navigation_mesh: impl AsObjectArg<NavigationMesh>,
source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>,
)
pub fn bake_from_source_geometry_data( &mut self, navigation_mesh: impl AsObjectArg<NavigationMesh>, source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>, )
To set the default parameters, use Self::bake_from_source_geometry_data_ex
and its builder methods. See the book for detailed usage instructions.
pub fn bake_from_source_geometry_data_ex<'a>( &'a mut self, navigation_mesh: impl AsObjectArg<NavigationMesh>, source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>, ) -> ExBakeFromSourceGeometryData<'a>
pub fn bake_from_source_geometry_data_async(
&mut self,
navigation_mesh: impl AsObjectArg<NavigationMesh>,
source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>,
)
pub fn bake_from_source_geometry_data_async( &mut self, navigation_mesh: impl AsObjectArg<NavigationMesh>, source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>, )
To set the default parameters, use Self::bake_from_source_geometry_data_async_ex
and its builder methods. See the book for detailed usage instructions.
pub fn bake_from_source_geometry_data_async_ex<'a>( &'a mut self, navigation_mesh: impl AsObjectArg<NavigationMesh>, source_geometry_data: impl AsObjectArg<NavigationMeshSourceGeometryData3D>, ) -> ExBakeFromSourceGeometryDataAsync<'a>
pub fn source_geometry_parser_create(&mut self) -> Rid
pub fn source_geometry_parser_set_callback( &mut self, parser: Rid, callback: Callable, )
pub fn simplify_path( &mut self, path: &PackedVector3Array, epsilon: f32, ) -> PackedVector3Array
pub fn free_rid(&mut self, rid: Rid)
pub fn set_active(&mut self, active: bool)
pub fn set_debug_enabled(&mut self, enabled: bool)
pub fn get_debug_enabled(&self) -> bool
pub fn get_process_info(&self, process_info: ProcessInfo) -> i32
Methods from Deref<Target = Object>§
pub fn get_class(&self) -> GString
pub fn is_class(&self, class: GString) -> bool
pub fn set(&mut self, property: StringName, value: &Variant)
pub fn get(&self, property: StringName) -> Variant
pub fn set_indexed(&mut self, property_path: NodePath, value: &Variant)
pub fn get_indexed(&self, property_path: NodePath) -> Variant
pub fn get_property_list(&self) -> Array<Dictionary>
pub fn get_method_list(&self) -> Array<Dictionary>
pub fn property_can_revert(&self, property: StringName) -> bool
pub fn property_get_revert(&self, property: StringName) -> Variant
pub fn set_script(&mut self, script: &Variant)
pub fn get_script(&self) -> Variant
pub fn set_meta(&mut self, name: StringName, value: &Variant)
pub fn remove_meta(&mut self, name: StringName)
pub fn get_meta(&self, name: StringName) -> Variant
pub fn get_meta(&self, name: StringName) -> Variant
To set the default parameters, use Self::get_meta_ex
and its builder methods. See the book for detailed usage instructions.
pub fn get_meta_ex<'a>(&'a self, name: StringName) -> ExGetMeta<'a>
pub fn has_meta(&self, name: StringName) -> bool
pub fn get_meta_list(&self) -> Array<StringName>
pub fn add_user_signal(&mut self, signal: GString)
pub fn add_user_signal(&mut self, signal: GString)
To set the default parameters, use Self::add_user_signal_ex
and its builder methods. See the book for detailed usage instructions.
pub fn add_user_signal_ex<'a>( &'a mut self, signal: GString, ) -> ExAddUserSignal<'a>
pub fn has_user_signal(&self, signal: StringName) -> bool
pub fn remove_user_signal(&mut self, signal: StringName)
pub fn emit_signal(&mut self, signal: StringName, varargs: &[Variant]) -> Error
pub fn emit_signal(&mut self, signal: StringName, varargs: &[Variant]) -> Error
§Panics
This is a varcall method, meaning parameters and return values are passed as Variant
.
It can detect call failures and will panic in such a case.
pub fn try_emit_signal(
&mut self,
signal: StringName,
varargs: &[Variant],
) -> Result<Error, CallError>
pub fn try_emit_signal( &mut self, signal: StringName, varargs: &[Variant], ) -> Result<Error, CallError>
§Return type
This is a varcall method, meaning parameters and return values are passed as Variant
.
It can detect call failures and will return Err
in such a case.
pub fn call(&mut self, method: StringName, varargs: &[Variant]) -> Variant
pub fn call(&mut self, method: StringName, varargs: &[Variant]) -> Variant
§Panics
This is a varcall method, meaning parameters and return values are passed as Variant
.
It can detect call failures and will panic in such a case.
pub fn try_call(
&mut self,
method: StringName,
varargs: &[Variant],
) -> Result<Variant, CallError>
pub fn try_call( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>
§Return type
This is a varcall method, meaning parameters and return values are passed as Variant
.
It can detect call failures and will return Err
in such a case.
pub fn call_deferred(
&mut self,
method: StringName,
varargs: &[Variant],
) -> Variant
pub fn call_deferred( &mut self, method: StringName, varargs: &[Variant], ) -> Variant
§Panics
This is a varcall method, meaning parameters and return values are passed as Variant
.
It can detect call failures and will panic in such a case.
pub fn try_call_deferred(
&mut self,
method: StringName,
varargs: &[Variant],
) -> Result<Variant, CallError>
pub fn try_call_deferred( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>
§Return type
This is a varcall method, meaning parameters and return values are passed as Variant
.
It can detect call failures and will return Err
in such a case.
pub fn set_deferred(&mut self, property: StringName, value: &Variant)
pub fn callv( &mut self, method: StringName, arg_array: &Array<Variant>, ) -> Variant
pub fn has_method(&self, method: StringName) -> bool
pub fn get_method_argument_count(&self, method: StringName) -> i32
pub fn has_signal(&self, signal: StringName) -> bool
pub fn get_signal_list(&self) -> Array<Dictionary>
pub fn get_signal_connection_list( &self, signal: StringName, ) -> Array<Dictionary>
pub fn get_incoming_connections(&self) -> Array<Dictionary>
pub fn connect(&mut self, signal: StringName, callable: Callable) -> Error
pub fn connect(&mut self, signal: StringName, callable: Callable) -> Error
To set the default parameters, use Self::connect_ex
and its builder methods. See the book for detailed usage instructions.
pub fn connect_ex<'a>( &'a mut self, signal: StringName, callable: Callable, ) -> ExConnect<'a>
pub fn disconnect(&mut self, signal: StringName, callable: Callable)
pub fn is_connected(&self, signal: StringName, callable: Callable) -> bool
pub fn set_block_signals(&mut self, enable: bool)
pub fn is_blocking_signals(&self) -> bool
pub fn notify_property_list_changed(&mut self)
pub fn set_message_translation(&mut self, enable: bool)
pub fn can_translate_messages(&self) -> bool
pub fn tr(&self, message: StringName) -> GString
pub fn tr(&self, message: StringName) -> GString
To set the default parameters, use Self::tr_ex
and its builder methods. See the book for detailed usage instructions.
pub fn tr_ex<'a>(&'a self, message: StringName) -> ExTr<'a>
pub fn tr_n(
&self,
message: StringName,
plural_message: StringName,
n: i32,
) -> GString
pub fn tr_n( &self, message: StringName, plural_message: StringName, n: i32, ) -> GString
To set the default parameters, use Self::tr_n_ex
and its builder methods. See the book for detailed usage instructions.
pub fn tr_n_ex<'a>( &'a self, message: StringName, plural_message: StringName, n: i32, ) -> ExTrN<'a>
pub fn is_queued_for_deletion(&self) -> bool
pub fn cancel_free(&mut self)
pub fn notify(&mut self, what: ObjectNotification)
pub fn notify(&mut self, what: ObjectNotification)
⚠️ Sends a Godot notification to all classes inherited by the object.
Triggers calls to on_notification()
, and depending on the notification, also to Godot’s lifecycle callbacks such as ready()
.
Starts from the highest ancestor (the Object
class) and goes down the hierarchy.
See also Godot docs for Object::notification()
.
§Panics
If you call this method on a user-defined object while holding a GdRef
or GdMut
guard on the instance, you will encounter
a panic. The reason is that the receiving virtual method on_notification()
acquires a GdMut
lock dynamically, which must
be exclusive.
pub fn notify_reversed(&mut self, what: ObjectNotification)
pub fn notify_reversed(&mut self, what: ObjectNotification)
⚠️ Like Self::notify()
, but starts at the most-derived class and goes up the hierarchy.
See docs of that method, including the panics.