Version: 2017.2
public bool carving ;

Descripción

Should this obstacle make a cut-out in the navmesh.

When enabled, this changes the navmesh by cutting out a hole. The shape of the hole is based on the size and shape set on NavMeshObstacle and the navmesh bake settings for radius and height.

Cuando el obstáculo se mueve, el hueco tallado también se moverá pero para reducir la cargar del CPU el hueco solo es re-calculado cuando sea necesario. La lógica del re-calculo tiene dos opciones : 1) tallar cuando sea estacionario, 2) tallar cuando sea movido.

"Carve when stationary" is the default behavior and is used when carveOnlyStationary is set to true. The obstacle is treated as moving when it has moved more than the distance set by carvingMoveThreshold. At this time, the carved hole is removed. When the obstacle has stopped moving, and has been stationary more than carvingTimeToStationary seconds, the obstacles is treated stationary and carving is updated again. While the obstacle is moving, the agents will avoid it using the collision avoidance, but will not plan paths around it. This mode is generally the best choice in terms of performance. It is good match when the game object is controlled by physics (i.e. crates and barrels).

"Carve when moved" behavior is used when carveOnlyStationary is set to false. In this mode the carved hole is updated when the obstacle has moved more than the distance set by carvingMoveThreshold. This mode is well suited for large slowly moving obstacles, for example a tank that is being avoided by infantry.