Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


position

Position of hit.
Read time 1 minuteLast updated 11 days ago

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.