s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
NavMesh
chevron_left
Classes
class
NavMesh
search
Properties
data_object
AgentHeight
data_object
AgentMaxSlope
data_object
AgentRadius
data_object
AgentStepSize
data_object
Bounds
data_object
CustomBounds
data_object
DeferGeneration
data_object
DrawMesh
data_object
EditorAutoUpdate
data_object
ExcludedBodies
data_object
IncludedBodies
data_object
IncludeKeyframedBodies
data_object
IncludeStaticBodies
data_object
IsDirty
data_object
IsEnabled
data_object
IsGenerating
Methods
functions
CalculatePath
functions
Dispose
functions
Generate
functions
GenerateTile
functions
GenerateTiles
functions
GetClosestEdge
functions
GetClosestPoint
functions
GetRandomPoint
remove_circle
GetSimplePath
functions
RequestTileGeneration
functions
RequestTilesGeneration
functions
SetDirty
functions
UnloadTile
functions
UnloadTiles
Static Methods
functions
BakeNavMesh
NavMesh
Navigation Mesh - allowing AI to navigate a world
class
Sandbox.Navigation
.
sealed
Sandbox.Engine
data_object
Properties
16
AgentHeight
float
Height of the agent
AgentMaxSlope
float
The maximum slope an agent can walk up (in degrees)
AgentRadius
float
The radius of the agent. This will change how much gap is left on the edges of surfaces, so they don't clip into walls.
AgentStepSize
float
The maximum height an agent can climb (step)
Bounds
BBox
The bounds to generate the navmesh within. Won't take effect until regenerated or reloaded.
CustomBounds
bool
By Default , the navmesh will calculate bounds based on the world geometry, but if you want to override that, you can set custom bounds here.
DeferGeneration
bool
Skip tile generation during scene load. Tiles can then be generated on demand via Sandbox.Navigation.NavMesh.GenerateTile(Sandbox.PhysicsWorld,Vector3), Sandbox.Navigation.NavMesh.RequestTileGeneration(Vector3), etc.
DrawMesh
bool
Draw the navigation mesh in the editor
EditorAutoUpdate
bool
Constantly update the navigation mesh in the editor
ExcludedBodies
TagSet
Don't include these bodies in the generation
IncludedBodies
TagSet
If any, we'll only include bodies with this tag
IncludeKeyframedBodies
bool
Should the generator include keyframed bodies
IncludeStaticBodies
bool
Should the generator include static bodies
IsDirty
bool
The navigation mesh is dirty and needs a complete rebuild
IsEnabled
bool
Determines wether the navigation mesh is enabled and should be generated
IsGenerating
bool
The navigation mesh is generating
functions
Methods
14
CalculatePath
(
request
)
NavMeshPath
Computes a navigation path between the specified start and target positions on the navmesh. Uses the same pathfinding algorithm as Sandbox.NavMeshAgent, taking agent configuration into account if provided. The result is suitable for direct use with Sandbox.NavMeshAgent.SetPath(Sandbox.Navigation.NavMeshPath). If a complete path cannot be found, the result may indicate an incomplete or failed path.
Dispose
(
)
Generate
(
world
)
Task`1
GenerateTile
(
world
,
worldPosition
)
Task
Generates or regenerates the navmesh tile at the given world position. This function is thread safe but can only be called from the main thread.
GenerateTiles
(
world
,
bounds
)
Task
Generates or regenerates the navmesh tiles overlapping with the given bounds. This function is thread safe but can only be called from the main thread.
GetClosestEdge
(
box
)
Nullable`1
GetClosestPoint
(
box
)
Nullable`1
GetRandomPoint
(
)
Nullable`1
GetSimplePath
(
from
,
to
)
obsolete
List`1
RequestTileGeneration
(
worldPosition
)
Queues the navmesh tile at the given world position for incremental generation over subsequent frames. Fire-and-forget alternative to Sandbox.Navigation.NavMesh.GenerateTile(Sandbox.PhysicsWorld,Vector3).
RequestTilesGeneration
(
bounds
)
Queues all navmesh tiles overlapping with the given bounds for incremental generation over subsequent frames. Fire-and-forget alternative to Sandbox.Navigation.NavMesh.GenerateTiles(Sandbox.PhysicsWorld,BBox).
SetDirty
(
)
Set the navgiation a dirty, so it will rebuild over the next few frames. If you need an immediate rebuild, call Sandbox.Navigation.NavMesh.Generate(Sandbox.PhysicsWorld) instead.
UnloadTile
(
worldPosition
)
Removes the navmesh tile at the given world position.
UnloadTiles
(
bounds
)
Removes all navmesh tiles overlapping with the given bounds.
functions
Static Methods
1
BakeNavMesh
(
)
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.