Photon Quantum 3.0.0

Classes | Functions
Navigation API

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...

Classes

class  Quantum.Navigation.Constants
 Global navigation constants. More...
 
interface  Quantum.ISignalOnNavMeshMoveAgent
 
interface  Quantum.ISignalOnNavMeshSearchFailed
 
interface  Quantum.ISignalOnNavMeshWaypointReached
 
class  Quantum.Navigation
 Navigation API More...
 
class  Quantum.NavMeshAgentConfig
 The configuration file for navmesh agent components. More...
 
struct  Quantum.NavMeshAvoidanceAgent
 A component that will make the agent avoid other agents while calculating the navigation steering. Requires NavMeshSteeringAgent and NavMeshPathfinder. More...
 
struct  Quantum.NavMeshAvoidanceObstacle
 A component that represents a circle-shaped obstacle for navmesh agents to avoid. This is not altering the navmesh itself, but it is dynamic obstacle to be avoided by other agents steering. More...
 
struct  Quantum.NavMeshPathfinder
 The NavMeshAgent is an entity component for automated navmesh navigation and steering. Use NavMeshPathfinder.Create(FrameBase, EntityRef, NavMeshAgentConfig) to create pathfinder components. Also see NavMesh and NavMeshAgentConfig More...
 
struct  Quantum.NavMeshSteeringAgent
 A component to enable the steering toward a target position calculated by the navigation system. Requires NavMeshPathfinder component. More...
 

Functions

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...
 

Detailed Description

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).

The Quantum.NavMesh (navigation mesh) is the data structure made up of triangles that agents can walk on.

The Quantum.NavMeshPathfinder is an entity component that will make an entity find paths through the navigation mesh.

The Quantum.NavMeshSteeringAgent is an entity component that will make an entity find paths through the navigation mesh.

The Quantum.NavMeshSteeringAgent is an entity component that will make an entity find paths through the navigation mesh.

Function Documentation

◆ FindPath() [1/4]

Navigation.FindPathResult Quantum.Navigation.FindPath ( FrameThreadSafe  frame,
FPVector3  start,
FPVector3  end,
NavMesh  navmesh,
NavMeshRegionMask  regionMask 
)
inline

Find a path (thread-safe). Uses automatic target correction with radius 1 and PathQuality Good.

Parameters
frameFrame object.
startStarting position
endTarget position
navmeshThe navmesh to operate on
regionMaskRegion mask is used to check if navmesh parts are active or inactive
Returns
The corrected start position

◆ FindPath() [2/4]

Navigation.FindPathResult Quantum.Navigation.FindPath ( FrameThreadSafe  frame,
FPVector3  start,
FPVector3  end,
NavMesh  navmesh,
NavMeshRegionMask  regionMask,
bool  automaticTargetCorrection,
FP  automaticTargetCorrectionRadius,
PathQuality  quality = PathQuality.Good 
)
inline

Find a path (thread-safe).

Parameters
frameFrame object.
startStarting position
endTarget position
navmeshThe navmesh to operate on
regionMaskRegion mask is used to check if navmesh parts are active or inactive
automaticTargetCorrectionIf the target is outside the navmesh the position will be tried to be corrected.
automaticTargetCorrectionRadiusThe range to validated the start and target position.
qualityThe path quality
Returns
The corrected start position

◆ FindPath() [3/4]

FindPathResult Quantum.Navigation.FindPath ( FrameThreadSafe  frame,
FPVector2  start,
FPVector2  end,
NavMesh  navmesh,
NavMeshRegionMask  regionMask 
)
inline

Find a path (thread-safe).

Parameters
frameFrame object
startStarting position
endTarget position
navmeshThe navmesh to operate on
regionMaskRegion mask is used to check if navmesh parts are active or inactive
Returns
The corrected start position

◆ FindPath() [4/4]

FindPathResult Quantum.Navigation.FindPath ( FrameThreadSafe  frame,
FPVector2  start,
FPVector2  end,
NavMesh  navmesh,
NavMeshRegionMask  regionMask,
bool  automaticTargetCorrection,
FP  automaticTargetCorrectionRadius,
PathQuality  quality 
)
inline

Find a path (thread-safe).

Parameters
frameFrame object
startStarting position
endTarget position
navmeshThe navmesh to operate on
regionMaskRegion mask is used to check if navmesh parts are active or inactive
automaticTargetCorrectionIf the target is outside the navmesh the position will be tried to be corrected.
automaticTargetCorrectionRadiusThe range to validate the start and target position.
qualityThe path quality
Returns
The corrected start position

◆ LineOfSight() [1/2]

unsafe Boolean Quantum.Navigation.LineOfSight ( FPVector3  positionStart,
FPVector3  positionDestination,
NavMeshRegionMask  regionMask,
NavMesh  navmesh,
int  triangleStart = -1,
int  triangleDestination = -1 
)
inline

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
positionStartStart position
positionDestinationTarget position
regionMaskRegion mask to identify enabled or disabled regions
navmeshNavmesh to check
triangleStartOptionally provide the triangle that the start position is on
triangleDestinationOptionally 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]

unsafe Boolean Quantum.Navigation.LineOfSight ( FPVector2  positionStart,
FPVector2  positionDestination,
NavMeshRegionMask  regionMask,
NavMesh  navmesh,
int  triangleStart = -1,
int  triangleDestination = -1 
)
inline

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
positionStartStart position
positionDestinationTarget position
regionMaskRegion mask to identify enabled or disabled regions
navmeshNavmesh to check
triangleStartOptionally provide the triangle that the start position is on
triangleDestinationOptionally provide the triangle that the destination position is on
Returns
true if there is a unobstructed line of sight on the navmesh