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).
|script/unityengine/classes/navmeshobstacle/navmeshobstacle.txt · 最后更改: 2016/08/02 05:30 (外部编辑)