class in UnityEngine/Inherits from: Behaviour
An obstacle for NavMeshAgents to avoid.
A NavMeshObstacle is cylindrical in shape and can move around the surface of the NavMesh with a specified velocity. By default, the obstacle will only affect the agent's avoidance behaviour rather than the pathfinding. This means that the agent will ignore the obstacle when plotting a path but will sidestep around it while moving along the path. If carving is enabled, the obstacle will create a temporary “hole” in the NavMesh. The hole will be recognised by the pathfinding, so paths will be plotted to avoid the obstacle. This means that if, say, an obstacle blocks a narrow gap, the pathfinding will seek an alternative route to the target. Without carving, the agent will head for the gap but won't be able to pass until the obstacle is clear.
|carveOnlyStationary||Should this obstacle be carved when it is constantly moving?
|carving||Should this obstacle make a cut-out in the navmesh.
|carvingMoveThreshold||Threshold distance for updating a moving carved hole (when carving is enabled).
|carvingTimeToStationary||Time to wait until obstacle is treated as stationary (when carving and carveOnlyStationary are enabled).
|center||The center of the obstacle, measured in the object's local space.
|height||Height of the obstacle's cylinder shape.
|radius||Radius of the obstacle's capsule shape.
|shape||Shape of the obstacle.
|size||The size of the obstacle, measured in the object's local space.
|velocity||Velocity at which the obstacle moves around the NavMesh.