# SNavMeshObstacle

## Index

### Properties Index

| Property Name                                                    |
| ---------------------------------------------------------------- |
| bool [**CarveOnlyStationary** ](#carveonlystationary)`get` `set` |
| bool [**Carving** ](#carving)`get` `set`                         |
| SVector [**Center** ](#center)`get` `set`                        |
| float [**Height** ](#height)`get` `set`                          |
| SVector [**Size** ](#size)`get` `set`                            |
| float [**Radius** ](#radius)`get` `set`                          |
| int [**Shape** ](#shape)`get` `set`                              |
| float [**MoveThreshold** ](#movethreshold)`get` `set`            |
| float [**TimeToStationary** ](#timetostationary)`get` `set`      |
| SGameObject [**GameObject** ](#gameobject)`get`                  |

## Properties

### CarveOnlyStationary

bool **CarveOnlyStationary** `get` `set`

*When enabled, the obstacle is carved only when it is stationary. (Only can enabled after carve was ticked).*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.CarveOnlyStationary = true
```

{% endtab %}
{% endtabs %}

### Carving

bool **Carving** `get` `set`

*When the Carve checkbox gets ticked, the Nav Mesh Obstacle creates a hole in the NavMesh.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.Carving = true
```

{% endtab %}
{% endtabs %}

### Center

SVector **Center** `get` `set`

*Center of the obstacle geometry relative to the transform position.*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.Center = Vector.New(0,0,0)
```

{% endtab %}
{% endtabs %}

### Height

float **Height** `get` `set`

*Height of the capsule. (Property of Capsule shape).*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.Height = 40
```

{% endtab %}
{% endtabs %}

### Size

SVector **Size** `get` `set`

*Size of the box. (Property of Box shape).*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.Size = Vector.New(5,10,15)
```

{% endtab %}
{% endtabs %}

### Radius

float **Radius** `get` `set`

*Property Description*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.Radius = 10
```

{% endtab %}
{% endtabs %}

### Shape

int **Shape** `get` `set`

*Property Description*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.Shape = 1
```

{% endtab %}
{% endtabs %}

### MoveThreshold

float **MoveThreshold** `get` `set`

*Use this property to set the threshold distance for updating a moving carved hole. (Only can take effect after carve was ticked)*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.MoveThreshold = 5
```

{% endtab %}
{% endtabs %}

### TimeToStationary

float **TimeToStationary** `get` `set`

*The time to wait until the obstacle is treated as stationary. (Only can take effect after carve was ticked).*

{% tabs %}
{% tab title="Lua" %}

```lua
Space.Host.ExecutingObject.NavMeshObstacle.TimeToStationary = 5.0
```

{% endtab %}
{% endtabs %}

### GameObject

[SGameObject](https://docs.sine.space/scripting/client-scripting-api-reference/types/sgameobject) **GameObject** `get`

*Property Description*

{% tabs %}
{% tab title="Lua" %}

```lua
theGameObject = Space.Host.ExecutingObject.NavMeshObstacle.GameObject
```

{% endtab %}
{% endtabs %}
