The size of the obstacle, measured in the object's local space.
The size will be scaled by the transform's scale.
// Fit a box shaped obstacle to the attached mesh
function Start () { var obstacle : UnityEngine.AI.NavMeshObstacle = GetComponent.<UnityEngine.AI.NavMeshObstacle>(); var mesh : Mesh = GetComponent.<MeshFilter>().mesh;
obstacle.shape = UnityEngine.AI.NavMeshObstacleShape.Box; obstacle.size = mesh.bounds.size; }
no example available in C#
Did you find this page useful? Please give it a rating: