Navigation
API > API/Runtime > API/Runtime/Navmesh
Description
Determines if the specified point is inside the convex polygon on the xz-plane.
All points are projected onto the xz-plane, so the y-values are ignored.
| Name | dtPointInPolygon |
| Type | function |
| Header File | /Engine/Source/Runtime/Navmesh/Public/Detour/DetourCommon.h |
| Include Path | #include "Detour/DetourCommon.h" |
| Source | /Engine/Source/Runtime/Navmesh/Private/Detour/DetourCommon.cpp |
bool dtPointInPolygon
(
const dtReal * pt,
const dtReal * verts,
const int nverts
)
True if the point is inside the polygon.
Parameters
| Name | Remarks |
|---|---|
| pt | The point to check. [(x, y, z)] |
| verts | The polygon vertices. [(x, y, z) * nverts] |
| nverts | The number of vertices. [Limit: >= 3] |