Version: 2022.1
언어: 한국어
Experimental: this API is experimental and might be changed or removed in the future.

NavMeshQuery.GetPortalPoints

매뉴얼로 전환
public bool GetPortalPoints (Experimental.AI.PolygonId polygon, Experimental.AI.PolygonId neighbourPolygon, out Vector3 left, out Vector3 right);

파라미터

polygon First NavMesh node.
neighbourPolygon Second NavMesh node.
left One of the world points for the resulting separation edge which must be passed through when traversing between the two specified nodes. This point is the left side of the edge when traversing from the first node to the second.
right One of the world points for the resulting separation edge which must be passed through when traversing between the two specified nodes. This point is the right side of the edge when traversing from the first node to the second.

반환

bool True if a connection exists between the two NavMesh nodes. False if no connection exists between the two NavMesh nodes.

설명

Obtains the end points of the line segment common to two adjacent NavMesh nodes.

For two polygons that are part of a NavMesh surface, this method returns the edge where both polygons meet. If the two polygons are in different NavMesh tiles the connected edges can be of different length or have different start and end positions from each other. If this happens the resulting separation edge is the overlapping part of the edges, which may be shorter than either of the individual edges.

When one node is a link and the other is a polygon, the returned points are placed where the link intersects the polygon.

The resulting positions are expressed in world space and can be transformed into a NavMesh's local space by the use of NavMeshQuery.PolygonWorldToLocalMatrix.

See Also: NavMeshQuery.GetEdgesAndNeighbors.