@par This method is meant to be used for quick, short distance checks. If the path array is too small to hold the result, it will be filled as far as possible from the start postion toward the end position. Using the Hit Parameter (t) If the hit parameter is a very high value (FLT_MAX), then the ray has hit the end position. In this case the path represents a valid corridor to the end p
| 2435 | /// this method is meant for short distance checks. |
| 2436 | /// |
| 2437 | dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, const float* endPos, |
| 2438 | const dtQueryFilter* filter, |
| 2439 | float* t, float* hitNormal, dtPolyRef* path, int* pathCount, const int maxPath) const |
| 2440 | { |
| 2441 | dtRaycastHit hit; |
| 2442 | hit.path = path; |
| 2443 | hit.maxPath = maxPath; |
| 2444 | |
| 2445 | dtStatus status = raycast(startRef, startPos, endPos, filter, 0, &hit); |
| 2446 | |
| 2447 | *t = hit.t; |
| 2448 | if (hitNormal) |
| 2449 | dtVcopy(hitNormal, hit.hitNormal); |
| 2450 | if (pathCount) |
| 2451 | *pathCount = hit.pathCount; |
| 2452 | |
| 2453 | return status; |
| 2454 | } |
| 2455 | |
| 2456 | |
| 2457 | /// @par |
no test coverage detected