Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

NavMeshObstacle.carving

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual
public var carving: bool;
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.