static function Raycast (sourcePosition : Vector3, targetPosition : Vector3, out hit : NavMeshHit, passableMask : int) : boolean
Parameters
| Name | Description |
| sourcePosition |
The origin of the ray.
|
| targetPosition |
The end of the ray.
|
| hit |
Holds the properties of the ray cast resulting location.
|
| passableMask |
A mask specifying which NavMesh layers can be passed when tracing the ray.
|
Returns
boolean - True if the ray is terminated before reaching target position. Otherwise returns false.
Description
Trace a ray between two points on the NavMesh.