|
static bool AVR.Core.Utils.Phys.PathCast |
( |
Vector3[] |
positions, |
|
|
out RaycastHit |
hit, |
|
|
Matrix4x4 |
localToWorld |
|
) |
| |
|
inlinestatic |
Perform linecasts along a spline of positions given in local space.
- Parameters
-
positions | List of positions in LOCAL space. Linecasts will be performed for each pair of subsequent points |
hit | RaycastHit of the first hit encountered. |
localToWorld | Transformation matrix to convert given positions from local to world space. |
- Returns
- True if something is hit, otherwise false.
Definition at line 138 of file AVR_Utils.cs.
140 for ( int i = 0; i < positions.Length - 1; i++)
142 if (Physics.Linecast(localToWorld * positions[i], localToWorld * positions[i + 1], out hit))
147 hit = new RaycastHit();
|