文档

Unity Engine

Unity Engine

position

Position of hit.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine.AI
  • Assembly: UnityEngine.AIModule
public Vector3 position { get; set; }

Remarks

It is a position that a NavMesh Agent can move to, if it has a agentTypeID value that matches the agentTypeID of the NavMesh at that position. The position lies inside a NavMesh polygon. When the NavMesh also contains HeightMesh data, the position aligns to the HeightMesh polygon that is closest on the vertical axis.
If the position coordinates are not finite, the entire NavMeshHit object represents the result of an invalid query.