EnvironmentQuery3D

Inherits: Node3D

A node used to gather environment data using a QueryGenerator3D and evaluating them using QueryTest3Ds.

Description

EnvironmentQuery3D provides a flexible, node-based system for AI agents to ask spatial questions about the environment. Queries are composed by adding one QueryGenerator3D as child of the environment query and assigning QueryTest3Ds as children of the QueryGenerator3D.

Queries are time sliced in the background to maintain performance.

Properties

Node3D

querier

float

time_budget_ms

1.0

bool

use_debug_shapes

false

Methods

QueryResult3D

get_result()

bool

request_query()


Signals

query_finished(result: QueryResult3D) 🔗

Emitted when the query finishes processing.


Property Descriptions

Node3D querier 🔗

  • void set_querier(value: Node3D)

  • Node3D get_querier()

There is currently no description for this property. Please help us by contributing one!


float time_budget_ms = 1.0 🔗

  • void set_time_budget_ms(value: float)

  • float get_time_budget_ms()

Amount of time in milliseconds the query has each frame for processing. When budget is reached, the query pauses until the next SceneTree.process_frame.


bool use_debug_shapes = false 🔗

  • void set_use_debug_shapes(value: bool)

  • bool get_use_debug_shapes()

If true creates debug visuals in the environment, showing each QueryItem3D.


Method Descriptions

QueryResult3D get_result() 🔗

After requesting a query, the QueryResult3D is cached and can be called with this function.


bool request_query() 🔗

Request a query, processing it in the background, emitting query_finished when done.