Legacy Documentation: Version 4.6.2
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

NavMeshObstacle.carving

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public var carving: bool;
public bool carving;
public carving as bool

Description

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 bounding volume of the NavMeshObstacle and the navmesh bake settings for radius and height.

When the obstacle moves, the carved hole will also move but to reduce CPU overhead the hole is only recalculated when the obstacle is a certain distance from its previous position.- the carvingMoveThreshold property sets this distance.