What exactly is “obstacle carving”? What is an example of its usage? Could it be used to simulate destructible terrain?
Thank you
1 Answer
1The scripting reference was updated:
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.
I think it basically addresses the problem a lot of us saw with NavMeshObstacles where objects would simply slide around an obstacle rather than avoid it.