Navigation API More...
Classes | |
class | Config |
Global navmesh configurations which are part of the SimulationConfig. More... | |
class | Constants |
Global navigation constants. More... | |
struct | FindPathResult |
The result object for FindPath requests. More... | |
interface | IPathFinderData |
An interface to access a few selected internal pathfinding data. More... | |
class | PathFinder |
Navmesh TA* pathfinder class. More... | |
struct | PathVertex |
The data structure for the internal path waypoints. More... | |
class | ThreadLocal |
An internal class that stored multi-threading related navigation context. More... | |
Public Types | |
enum | AvoidanceQuality : Byte |
Quality settings for agent avoidance. More... | |
enum | AvoidanceType : Byte |
Avoidance type applied to the navmesh agent. More... | |
enum | MovementType : Byte |
Defines how velocity is applied to the agent component. More... | |
enum | PathQuality : Byte |
The quality of the A* heuristic function. More... | |
enum | RawPathAllocationStrategy : Byte |
In most cases the maximum raw path size set in Config.RawPathSize will suffice. Exceeding the size in Fixed mode will fail the pathfinding request. More... | |
enum | VerticalPositioningType : Byte |
Defines how the agents y-position will be calculation in 3D. More... | |
enum | WaypointFlag : Byte |
Flags stored with each navmesh agent waypoint. More... | |
Public Member Functions | |
void | Dispose () |
Dispose the navigation API. More... | |
FindPathResult | FindPath (FrameThreadSafe frame, FPVector2 start, FPVector2 end, NavMesh navmesh, NavMeshRegionMask regionMask) |
Find a path (thread-safe). More... | |
FindPathResult | 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 | 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 | 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... | |
QTuple< PathFinder, string > | GetDebugInformation (int threadIndex) |
Access read-only debug pathfinder information for thread index. More... | |
IPathFinderData | GetPathFinderData (FrameThreadSafe f) |
Access the pathfinder data after running Navigation.FindPath(). Don't save the IPathFinderData object anywhere, copy the needed. More... | |
unsafe Boolean | 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 | 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... | |
unsafe Boolean | Raycast2D (FrameThreadSafe frame, FPVector2 origin, FPVector2 direction, FP distance, NavMeshRegionMask regionMask, NavMesh navmesh, out FPVector2 hit) |
Obsolete method. More... | |
unsafe Boolean | Raycast2D (FrameThreadSafe frame, FPVector2 origin, FPVector2 direction, FP distance, NavMeshRegionMask regionMask, NavMesh navmesh, out FPVector2 hit, out int borderIndex) |
Raycast through the navmesh. Only works 2D, even when the navmesh is 3D. The ray is tested against navmesh borders. More... | |
unsafe Boolean | Raycast2D (FrameThreadSafe frame, FPVector3 origin, FPVector3 direction, FP distance, NavMeshRegionMask regionMask, NavMesh navmesh, out FPVector2 hit) |
Obsolete method. More... | |
unsafe Boolean | Raycast2D (FrameThreadSafe frame, FPVector3 origin, FPVector3 direction, FP distance, NavMeshRegionMask regionMask, NavMesh navmesh, out FPVector2 hit, out int borderIndex) |
Raycast through the navmesh. Only works 2D, even when the navmesh is 3D. The ray is tested against navmesh borders. More... | |
TaskHandle | Update (FrameBase frame, FP deltaTime, INavigationCallbacks callbacks, TaskHandle handle) |
Update the multi-threaded navigation API. More... | |
Public Attributes | |
Navigation.Config | NavigationConfig => _updater?._config |
Access the navigation config used for the navigation originated from the SimulationConfig. More... | |
Navigation API
|
strong |
|
strong |
|
strong |
Defines how velocity is applied to the agent component.
Enumerator | |
---|---|
None | Not applied. |
Transform | Directly applied to Transform2D or Transform3D of the agent. |
DynamicBody | Not used anymore. |
CharacterController3D | Not used anymore. |
Callback | Does not move the agent but executes the MoveAgent signal. |
|
strong |
The quality of the A* heuristic function.
|
strong |
In most cases the maximum raw path size set in Config.RawPathSize will suffice. Exceeding the size in Fixed mode will fail the pathfinding request.
Enumerator | |
---|---|
Fixed | Fixed size allocation. Will fail if the path exceeds the maximum size. |
Allocating | Growing the raw path size when needed. |
|
strong |
|
strong |
|
inline |
Dispose the navigation API.
|
inline |
Update the multi-threaded navigation API.
frame | Frame object |
deltaTime | Delta time |
callbacks | Callback object to use (can be null ) |
handle | The task handle to add tasks to |
|
inline |
Raycast through the navmesh. Only works 2D, even when the navmesh is 3D. The ray is tested against navmesh borders.
frame | Frame object |
origin | Ray origin |
direction | Ray direction |
distance | Ray length |
regionMask | Region mask to identify enabled or disabled regions |
navmesh | Navmesh |
hit | Position of the closest hit |
borderIndex | Index of the border that was hit (Navmesh.Borders[i]) |
true
is a hit was generated.
|
inline |
Raycast through the navmesh. Only works 2D, even when the navmesh is 3D. The ray is tested against navmesh borders.
frame | Frame object |
origin | Ray origin |
direction | Ray direction |
distance | Ray length |
regionMask | Region mask to identify enabled or disabled regions |
navmesh | Navmesh |
hit | Position of the closest hit |
borderIndex | Index of the border that was hit (Navmesh.Borders[i]) |
true
is a hit was generated.
|
inline |
Obsolete method.
|
inline |
Obsolete method.
|
inline |
Access the pathfinder data after running Navigation.FindPath(). Don't save the IPathFinderData object anywhere, copy the needed.
f | Frame object |
|
inline |
Access read-only debug pathfinder information for thread index.
threadIndex | Thread index |
Navigation.Config Quantum.Navigation.NavigationConfig => _updater?._config |
Access the navigation config used for the navigation originated from the SimulationConfig.