Version: 2021.2
言語: 日本語
Experimental: this API is experimental and might be changed or removed in the future.

NavMeshLocation

struct in UnityEngine.Experimental.AI

マニュアルに切り替える

説明

A world position that is guaranteed to be on the surface of the NavMesh.

The NavMeshLocation stores the position on the NavMesh surface together with the PolygonId of the NavMesh node containing that position. Using NavMeshLocations with NavMeshQuery operations remove the need to project the desired world position onto the NavMesh at the beginning of each and every operation.

A NavMeshLocation can be invalid in two situations: 1. When it has been created empty, instead of being the result of a NavMeshQuery operation. 2. When the NavMesh has been removed or modified at the indicated position or in its close vicinity.

If a NavMeshLocation is made invalid by a NavMeshObstacle carving the NavMesh in its vicinity the NavMeshLocation returns to a valid state if the NavMeshObstacle is removed. This is because removing a NavMeshObstacle restores the NavMesh to its original form without regenerating it.

See Also: NavMeshQuery.MapLocation, NavMeshQuery.IsValid, PolygonId.

変数

polygonUnique identifier for the node in the NavMesh to which the world position has been mapped.
positionA world position that sits precisely on the surface of the NavMesh or along its links.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961