RecastNavMeshQuery Class

Namespace
Atavism
Base Types
  • MonoBehaviour
graph BT Type-->Base0["MonoBehaviour"] Type["RecastNavMeshQuery"] class Type type-node

Syntax

[AddComponentMenu("Recast/NavMesh Query")]
[Serializable]
public class RecastNavMeshQuery : MonoBehaviour

Attributes

Type Description
AddComponentMenu
SerializableAttribute

Fields

Properties

Name Value Summary
Actors List<DetourActor>
Crowd Crowd
PathColors List<Color>
PathTriangles List<int>
PathUVs List<Vector2>
PathVerts List<Vector3>
StraightPathEnd int
Static to check if the straight path is at the end
StraightPathOffMeshConnection int
Static value to check if a connection is offmesh or not.

Methods

Name Value Summary
Awake() void
DrawPathGeometry() void
Draw the Polys for the path from startref to endref
GeneratePath() void
Builds a blocky path following the middle of the connecting edges across the nav mesh.
Initialize() void
InitializeQuery(Detour.NavMesh) void
Builds the initial query, normally called by awake Can be callen manually with a different nav mesh.
OnDrawGizmosSelected() void
SmoothGeneratedPath() void
Calls GeneratePath. Builds a smooth path by going to corners and trying to find the straightest paths possible across the NavMesh from the StartPosition to the EndPosition
Start() void
Update() void
Called once per frame - If a straight path has been found, it draws a debug line detailing the path