class NavMesh

robot_2Generated
code_blocksInput

Description

The NavMesh class in the Sandbox.Navigation namespace provides functionality for AI navigation within a world. It allows for the generation and management of navigation meshes, which are used by AI agents to navigate complex environments.

Members

Properties

Member NameSummary
IsEnabledDetermines whether the navigation mesh is enabled and should be generated.
IsGeneratingThe navigation mesh is generating.
IsDirtyThe navigation mesh is dirty and needs a complete rebuild.
IncludeStaticBodiesShould the generator include static bodies.
IncludeKeyframedBodiesShould the generator include keyframed bodies.
ExcludedBodiesDon't include these bodies in the generation.
IncludedBodiesIf any, we'll only include bodies with this tag.
EditorAutoUpdateConstantly update the navigation mesh in the editor.
DrawMeshDraw the navigation mesh in the editor.
AgentHeightHeight of the agent.
AgentRadiusThe radius of the agent. This will change how much gap is left on the edges of surfaces, so they don't clip into walls.
AgentStepSizeThe maximum height an agent can climb (step).
AgentMaxSlopeThe maximum slope an agent can walk up (in degrees).

Methods

Member NameSummary
DisposeDisposes of the navigation mesh resources.
SetDirtySet the navigation as dirty, so it will rebuild next update.
GenerateGenerates the navigation mesh for the given physics world.
GetSimplePathGets a simple path between two points.
GetRandomPointGets a random point on the navigation mesh.
GetClosestPointGets the closest point on the navigation mesh to a given position.
GetClosestEdgeGets the closest edge on the navigation mesh to a given position.
GenerateTileGenerates a navigation mesh tile for a specific world position.
GenerateTilesGenerates navigation mesh tiles for a specific bounding box.