The Quantum.Navigation class encapsulates most of the important navigation API calls like FindPath(), LineOfSight() and Raycast2D. It is ticked each frame by calling the Update() method (NavMeshAgentSystem).
More...
|
FindPathResult | Quantum.Navigation.FindPath (FrameThreadSafe frame, FPVector2 start, FPVector2 end, NavMesh navmesh, NavMeshRegionMask regionMask) |
| Find a path (thread-safe). More...
|
|
FindPathResult | Quantum.Navigation.FindPath (FrameThreadSafe frame, FPVector2 start, FPVector2 end, NavMesh navmesh, NavMeshRegionMask regionMask, bool automaticTargetCorrection, FP automaticTargetCorrectionRadius, PathQuality quality) |
| Find a path (thread-safe). More...
|
|
Navigation.FindPathResult | Quantum.Navigation.FindPath (FrameThreadSafe frame, FPVector3 start, FPVector3 end, NavMesh navmesh, NavMeshRegionMask regionMask) |
| Find a path (thread-safe). Uses automatic target correction with radius 1 and PathQuality Good. More...
|
|
Navigation.FindPathResult | Quantum.Navigation.FindPath (FrameThreadSafe frame, FPVector3 start, FPVector3 end, NavMesh navmesh, NavMeshRegionMask regionMask, bool automaticTargetCorrection, FP automaticTargetCorrectionRadius, PathQuality quality=PathQuality.Good) |
| Find a path (thread-safe). More...
|
|
unsafe Boolean | Quantum.Navigation.LineOfSight (FPVector2 positionStart, FPVector2 positionDestination, NavMeshRegionMask regionMask, NavMesh navmesh, int triangleStart=-1, int triangleDestination=-1) |
| Check line of sight inside the navmesh. This also works in 3D and creates a funnel through the navmesh triangles. Start and destination must be inside the navmesh. More...
|
|
unsafe Boolean | Quantum.Navigation.LineOfSight (FPVector3 positionStart, FPVector3 positionDestination, NavMeshRegionMask regionMask, NavMesh navmesh, int triangleStart=-1, int triangleDestination=-1) |
| Check line of sight inside the navmesh. This also works in 3D and creates a funnel through the navmesh triangles. Start and destination must be inside the navmesh. More...
|
|
The Quantum.Navigation class encapsulates most of the important navigation API calls like FindPath(), LineOfSight() and Raycast2D. It is ticked each frame by calling the Update() method (NavMeshAgentSystem).
- Quantum.Navigation.FindPath(FrameThreadSafe, FPVector2, FPVector2, NavMesh, NavMeshRegionMask)
- Quantum.Navigation.LineOfSight(FPVector2, FPVector2, NavMeshRegionMask, NavMesh, int, int)
- Quantum.Navigation.Raycast2D(FrameThreadSafe, FPVector2, FPVector2, FP, NavMeshRegionMask, NavMesh, out FPVector2)
The Quantum.NavMesh (navigation mesh) is the data structure made up of triangles that agents can walk on.
- Multiple navigation meshes can be used per map.
- The NavMesh comes with a standard A* path-finding algorithm.
- The mesh can have regions that are dynamically toggle-able (much like Unity navmesh obstacles that cannot move).
- Off-mesh links are supported.
- Although it already exports 3D data it does not understand the concept of height, yet.
The Quantum.NavMeshPathfinder is an entity component that will make an entity find paths through the navigation mesh.
- Usually this is paired with a steering agent but can also work by itself.
The Quantum.NavMeshSteeringAgent is an entity component that will make an entity find paths through the navigation mesh.
- After receiving a target the agent will move autonomously steer the map.
- Agents can be marked to be dynamic bodies and therefor never penetrate walls for example.
The Quantum.NavMeshSteeringAgent is an entity component that will make an entity find paths through the navigation mesh.
- Agents use an avoidance system (velocity obstacle model) with priorities to steer around other agents and obstacles.
◆ FindPath() [1/4]
Find a path (thread-safe). Uses automatic target correction with radius 1 and PathQuality Good.
- Parameters
-
frame | Frame object. |
start | Starting position |
end | Target position |
navmesh | The navmesh to operate on |
regionMask | Region mask is used to check if navmesh parts are active or inactive |
- Returns
- The corrected start position
◆ FindPath() [2/4]
Find a path (thread-safe).
- Parameters
-
frame | Frame object. |
start | Starting position |
end | Target position |
navmesh | The navmesh to operate on |
regionMask | Region mask is used to check if navmesh parts are active or inactive |
automaticTargetCorrection | If the target is outside the navmesh the position will be tried to be corrected. |
automaticTargetCorrectionRadius | The range to validated the start and target position. |
quality | The path quality |
- Returns
- The corrected start position
◆ FindPath() [3/4]
Find a path (thread-safe).
- Parameters
-
frame | Frame object |
start | Starting position |
end | Target position |
navmesh | The navmesh to operate on |
regionMask | Region mask is used to check if navmesh parts are active or inactive |
- Returns
- The corrected start position
◆ FindPath() [4/4]
Find a path (thread-safe).
- Parameters
-
frame | Frame object |
start | Starting position |
end | Target position |
navmesh | The navmesh to operate on |
regionMask | Region mask is used to check if navmesh parts are active or inactive |
automaticTargetCorrection | If the target is outside the navmesh the position will be tried to be corrected. |
automaticTargetCorrectionRadius | The range to validate the start and target position. |
quality | The path quality |
- Returns
- The corrected start position
◆ LineOfSight() [1/2]
Check line of sight inside the navmesh. This also works in 3D and creates a funnel through the navmesh triangles. Start and destination must be inside the navmesh.
- Parameters
-
positionStart | Start position |
positionDestination | Target position |
regionMask | Region mask to identify enabled or disabled regions |
navmesh | Navmesh to check |
triangleStart | Optionally provide the triangle that the start position is on |
triangleDestination | Optionally provide the triangle that the destination position is on |
- Returns
true
if there is an unobstructed line of sight on the navmesh
◆ LineOfSight() [2/2]
Check line of sight inside the navmesh. This also works in 3D and creates a funnel through the navmesh triangles. Start and destination must be inside the navmesh.
- Parameters
-
positionStart | Start position |
positionDestination | Target position |
regionMask | Region mask to identify enabled or disabled regions |
navmesh | Navmesh to check |
triangleStart | Optionally provide the triangle that the start position is on |
triangleDestination | Optionally provide the triangle that the destination position is on |
- Returns
true
if there is a unobstructed line of sight on the navmesh