simvx.core.navigation3d.nodes¶
Navigation3D node types: Region (holds a mesh), Agent (path-follower), Obstacle (dynamic).
Module Contents¶
Classes¶
Node that holds a NavigationMesh3D and registers it with the server. |
|
3D pathfinding agent that follows paths on the navigation mesh. |
|
Dynamic obstacle that affects navigation agent avoidance. |
Data¶
API¶
- simvx.core.navigation3d.nodes.log¶
‘getLogger(…)’
- class simvx.core.navigation3d.nodes.NavigationRegion3D(navigation_mesh: simvx.core.navigation3d.mesh.NavigationMesh3D | None = None, **kwargs)[source]¶
Bases:
simvx.core.nodes_3d.node3d.Node3DNode that holds a NavigationMesh3D and registers it with the server.
Attach a NavigationMesh3D to this node and add it to the scene tree to make its walkable surface available for pathfinding.
Initialization
- enabled¶
‘Property(…)’
- render_layer¶
‘Property(…)’
- property position¶
- property rotation: simvx.core.math.types.Quat¶
- property scale¶
- property rotation_degrees: simvx.core.math.types.Vec3¶
- property world_position: simvx.core.math.types.Vec3¶
- property world_rotation: simvx.core.math.types.Quat¶
- property world_scale: simvx.core.math.types.Vec3¶
- property forward: simvx.core.math.types.Vec3¶
- property right: simvx.core.math.types.Vec3¶
- property up: simvx.core.math.types.Vec3¶
- translate(offset: tuple[float, float, float] | numpy.ndarray)¶
- translate_global(offset: tuple[float, float, float] | numpy.ndarray)¶
- rotate(axis: tuple[float, float, float] | numpy.ndarray, angle: float)¶
- rotate_x(angle: float)¶
- rotate_y(angle: float)¶
- rotate_z(angle: float)¶
- look_at(target: tuple[float, float, float] | numpy.ndarray, up=None)¶
- set_render_layer(index: int, enabled: bool = True) → None¶
- is_on_render_layer(index: int) → bool¶
- wrap_bounds(bounds: tuple[float, float, float] | numpy.ndarray, margin: float = 1.0)¶
- strict_errors: ClassVar[bool]¶
True
- script_error_raised¶
‘Signal(…)’
- classmethod __init_subclass__(**kwargs)¶
- property name: str¶
- property process_mode: simvx.core.descriptors.ProcessMode¶
- property visible: bool¶
- reset_error() → None¶
- add_child(node: simvx.core.node.Node) → simvx.core.node.Node¶
- remove_child(node: simvx.core.node.Node)¶
- reparent(new_parent: simvx.core.node.Node)¶
- get_node(path: str) → simvx.core.node.Node¶
- find_child(name: str, recursive: bool = False) → simvx.core.node.Node | None¶
- find(node_type: type, recursive: bool = True) → simvx.core.node.Node | None¶
- walk(*, include_self: bool = True) → collections.abc.Iterator[simvx.core.node.Node]¶
- property path: str¶
- add_to_group(group: str)¶
- remove_from_group(group: str)¶
- is_in_group(group: str) → bool¶
- ready() → None¶
- process(dt: float) → None¶
- physics_process(dt: float) → None¶
- draw(renderer) → None¶
- picked(event: simvx.core.events.InputEvent) → None¶
- handle_input(event: simvx.core.events.TreeInputEvent) → None¶
- unhandled_input(event: simvx.core.events.TreeInputEvent) → None¶
- start_coroutine(gen: simvx.core.descriptors.Coroutine) → simvx.core.descriptors.CoroutineHandle¶
- stop_coroutine(gen_or_handle)¶
- clear_children()¶
- destroy()¶
- property app¶
- property tree: simvx.core.scene_tree.SceneTree¶
- __getitem__(key: str)¶
- classmethod get_properties() → dict[str, simvx.core.descriptors.Property]¶
- __repr__()¶
- class simvx.core.navigation3d.nodes.NavigationAgent3D(**kwargs)[source]¶
Bases:
simvx.core.nodes_3d.node3d.Node3D3D pathfinding agent that follows paths on the navigation mesh.
Computes a path to target_position and advances along it each physics frame. Emits navigation_finished when the target is reached.
Attach as a child of a Node3D whose position you want to steer.
Initialization
- target_desired_distance¶
‘Property(…)’
- path_desired_distance¶
‘Property(…)’
- max_speed¶
‘Property(…)’
- avoidance_radius¶
‘Property(…)’
- property target_position: simvx.core.math.types.Vec3[source]¶
- property remaining_path_points: int[source]¶
Number of waypoints ahead of the agent on its current path.
- property remaining_path_length: float[source]¶
Total distance along the path from the agent’s current position to the final waypoint.
Sums the straight-line distance from the agent to the next waypoint plus each remaining segment. Returns 0.0 when the path is empty or fully consumed.
- get_next_path_position() → simvx.core.math.types.Vec3[source]¶
Get the next waypoint position the agent is heading toward.
Returns: Next waypoint, or current position if path is empty.
- render_layer¶
‘Property(…)’
- property position¶
- property rotation: simvx.core.math.types.Quat¶
- property scale¶
- property rotation_degrees: simvx.core.math.types.Vec3¶
- property world_position: simvx.core.math.types.Vec3¶
- property world_rotation: simvx.core.math.types.Quat¶
- property world_scale: simvx.core.math.types.Vec3¶
- property forward: simvx.core.math.types.Vec3¶
- property right: simvx.core.math.types.Vec3¶
- property up: simvx.core.math.types.Vec3¶
- translate(offset: tuple[float, float, float] | numpy.ndarray)¶
- translate_global(offset: tuple[float, float, float] | numpy.ndarray)¶
- rotate(axis: tuple[float, float, float] | numpy.ndarray, angle: float)¶
- rotate_x(angle: float)¶
- rotate_y(angle: float)¶
- rotate_z(angle: float)¶
- look_at(target: tuple[float, float, float] | numpy.ndarray, up=None)¶
- set_render_layer(index: int, enabled: bool = True) → None¶
- is_on_render_layer(index: int) → bool¶
- wrap_bounds(bounds: tuple[float, float, float] | numpy.ndarray, margin: float = 1.0)¶
- strict_errors: ClassVar[bool]¶
True
- script_error_raised¶
‘Signal(…)’
- classmethod __init_subclass__(**kwargs)¶
- property name: str¶
- property process_mode: simvx.core.descriptors.ProcessMode¶
- property visible: bool¶
- reset_error() → None¶
- add_child(node: simvx.core.node.Node) → simvx.core.node.Node¶
- remove_child(node: simvx.core.node.Node)¶
- reparent(new_parent: simvx.core.node.Node)¶
- get_node(path: str) → simvx.core.node.Node¶
- find_child(name: str, recursive: bool = False) → simvx.core.node.Node | None¶
- find(node_type: type, recursive: bool = True) → simvx.core.node.Node | None¶
- walk(*, include_self: bool = True) → collections.abc.Iterator[simvx.core.node.Node]¶
- property path: str¶
- add_to_group(group: str)¶
- remove_from_group(group: str)¶
- is_in_group(group: str) → bool¶
- ready() → None¶
- enter_tree() → None¶
- exit_tree() → None¶
- process(dt: float) → None¶
- draw(renderer) → None¶
- picked(event: simvx.core.events.InputEvent) → None¶
- handle_input(event: simvx.core.events.TreeInputEvent) → None¶
- unhandled_input(event: simvx.core.events.TreeInputEvent) → None¶
- start_coroutine(gen: simvx.core.descriptors.Coroutine) → simvx.core.descriptors.CoroutineHandle¶
- stop_coroutine(gen_or_handle)¶
- clear_children()¶
- destroy()¶
- property app¶
- property tree: simvx.core.scene_tree.SceneTree¶
- __getitem__(key: str)¶
- classmethod get_properties() → dict[str, simvx.core.descriptors.Property]¶
- __repr__()¶
- class simvx.core.navigation3d.nodes.NavigationObstacle3D(position=None, rotation=None, scale=None, **kwargs)[source]¶
Bases:
simvx.core.nodes_3d.node3d.Node3DDynamic obstacle that affects navigation agent avoidance.
Place in the scene tree to create areas that agents will steer around. Does not carve the navmesh — instead, agents detect obstacles at runtime and adjust their velocity to avoid collisions.
Initialization
- radius¶
‘Property(…)’
- height¶
‘Property(…)’
- render_layer¶
‘Property(…)’
- property position¶
- property rotation: simvx.core.math.types.Quat¶
- property scale¶
- property rotation_degrees: simvx.core.math.types.Vec3¶
- property world_position: simvx.core.math.types.Vec3¶
- property world_rotation: simvx.core.math.types.Quat¶
- property world_scale: simvx.core.math.types.Vec3¶
- property forward: simvx.core.math.types.Vec3¶
- property right: simvx.core.math.types.Vec3¶
- property up: simvx.core.math.types.Vec3¶
- translate(offset: tuple[float, float, float] | numpy.ndarray)¶
- translate_global(offset: tuple[float, float, float] | numpy.ndarray)¶
- rotate(axis: tuple[float, float, float] | numpy.ndarray, angle: float)¶
- rotate_x(angle: float)¶
- rotate_y(angle: float)¶
- rotate_z(angle: float)¶
- look_at(target: tuple[float, float, float] | numpy.ndarray, up=None)¶
- set_render_layer(index: int, enabled: bool = True) → None¶
- is_on_render_layer(index: int) → bool¶
- wrap_bounds(bounds: tuple[float, float, float] | numpy.ndarray, margin: float = 1.0)¶
- strict_errors: ClassVar[bool]¶
True
- script_error_raised¶
‘Signal(…)’
- classmethod __init_subclass__(**kwargs)¶
- property name: str¶
- property process_mode: simvx.core.descriptors.ProcessMode¶
- property visible: bool¶
- reset_error() → None¶
- add_child(node: simvx.core.node.Node) → simvx.core.node.Node¶
- remove_child(node: simvx.core.node.Node)¶
- reparent(new_parent: simvx.core.node.Node)¶
- get_node(path: str) → simvx.core.node.Node¶
- find_child(name: str, recursive: bool = False) → simvx.core.node.Node | None¶
- find(node_type: type, recursive: bool = True) → simvx.core.node.Node | None¶
- walk(*, include_self: bool = True) → collections.abc.Iterator[simvx.core.node.Node]¶
- property path: str¶
- add_to_group(group: str)¶
- remove_from_group(group: str)¶
- is_in_group(group: str) → bool¶
- ready() → None¶
- process(dt: float) → None¶
- physics_process(dt: float) → None¶
- draw(renderer) → None¶
- picked(event: simvx.core.events.InputEvent) → None¶
- handle_input(event: simvx.core.events.TreeInputEvent) → None¶
- unhandled_input(event: simvx.core.events.TreeInputEvent) → None¶
- start_coroutine(gen: simvx.core.descriptors.Coroutine) → simvx.core.descriptors.CoroutineHandle¶
- stop_coroutine(gen_or_handle)¶
- clear_children()¶
- destroy()¶
- property app¶
- property tree: simvx.core.scene_tree.SceneTree¶
- __getitem__(key: str)¶
- classmethod get_properties() → dict[str, simvx.core.descriptors.Property]¶
- __repr__()¶