class NavMesh
in global :: Sandbox . Navigation
Navigation Mesh - allowing AI to navigate a world
public bool IsEnabled { get; set; }
Determines wether the navigation mesh is enabled and should be generated
public bool IsGenerating { get; }
The navigation mesh is generating
public bool IsDirty { get; }
The navigation mesh is dirty and needs a complete rebuild
public bool IncludeStaticBodies { get; set; }
Should the generator include static bodies
public bool IncludeKeyframedBodies { get; set; }
Should the generator include keyframed bodies
public TagSet ExcludedBodies { get; set; }
Don't include these bodies in the generation
public TagSet IncludedBodies { get; set; }
If any, we'll only include bodies with this tag
public bool EditorAutoUpdate { get; set; }
Constantly update the navigation mesh in the editor
public bool DrawMesh { get; set; }
Draw the navigation mesh in the editor
public float AgentHeight { get; set; }
Height of the agent
public float AgentRadius { get; set; }
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.
public float AgentStepSize { get; set; }
The maximum height an agent can climb (step)
public float AgentMaxSlope { get; set; }
The maximum slope an agent can walk up (in degrees)
public Nullable<Vector3> GetRandomPoint( BBox box )
Get a random point on the navmesh, within the bounding box. This will return null if it can't find a point on the navmesh in a few tries. Returning false doesn't mean it's impossible, our algorithm here isn't the best.
public Nullable<Vector3> GetRandomPoint( Vector3 position, float radius )
Get a random point on the navmesh, within the sphere. This will return null if it can't find a point on the navmesh in a few tries. Returning false doesn't mean it's impossible, our algorithm here isn't the best.
public Task GenerateTile( PhysicsWorld world, Vector3 worldPosition )
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.
Remarks: While most of the generation happens in parallel, this function also requires some time on the main thread. If you need to update many tiles, consider spreading the updates accross multiple frames.
public Task GenerateTiles( PhysicsWorld world, BBox bounds )
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.
Remarks: While most of the generation happens in parallel, this function also requires some time on the main thread. If you need to update many tiles, consider spreading the updates accross multiple frames.
public Nullable<Vector3> GetClosestEdge( BBox box )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Nullable<Vector3> GetClosestEdge( Vector3 position, float radius = 1024 )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public void SetDirty( )
😔 No documentation found.
public Nullable<Vector3> GetClosestPoint( BBox box )
😔 No documentation found.
public Nullable<Vector3> GetRandomPoint( )
😔 No documentation found.
public List<Vector3> GetSimplePath( Vector3 from, Vector3 to )
😔 No documentation found.
public Task<bool> Generate( PhysicsWorld world )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public Nullable<Vector3> GetClosestPoint( Vector3 position, float radius = 1024 )
😔 No documentation found.
public void Dispose( )
😔 No documentation found.