> For the complete documentation index, see [llms.txt](https://vc-docs.gitbook.io/engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vc-docs.gitbook.io/engine/home/doxygen_synced/classes/class_collider.md).

# Collider

**Usage:** `api.Collider.Enabled(collider, true)`

Wrappers around UnityEngine.Collider (and CapsuleCollider).

## Public Functions

|                     | Name                                                                                                                                                                                                                                                                                                                        |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UnityEngine.Vector3 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_collider.md#function-colliderclosestpoint"><strong>ColliderClosestPoint</strong></a>(UnityEngine.Collider collider, UnityEngine.Vector3 position)<br>Returns the nearest point on the collider to the given position.</p> |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_collider.md#function-enabled"><strong>Enabled</strong></a>(UnityEngine.Collider collider, bool enable)<br>Enables or disables the collider.</p>                                                                           |
| Bounds              | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_collider.md#function-bounds"><strong>Bounds</strong></a>(UnityEngine.Collider collider)<br>Returns the collider's world-space bounds.</p>                                                                                 |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_collider.md#function-setheight"><strong>SetHeight</strong></a>(UnityEngine.CapsuleCollider collider, float height)<br>Sets a capsule collider's height.</p>                                                               |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_collider.md#function-setradius"><strong>SetRadius</strong></a>(UnityEngine.CapsuleCollider collider, float radius)<br>Sets a capsule collider's radius.</p>                                                               |
| void                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_collider.md#function-setcenter"><strong>SetCenter</strong></a>(UnityEngine.CapsuleCollider collider, UnityEngine.Vector3 center)<br>Sets a capsule collider's center offset.</p>                                          |

## Public Functions Documentation

### function ColliderClosestPoint

```csharp
static UnityEngine.Vector3 ColliderClosestPoint(
    UnityEngine.Collider collider,
    UnityEngine.Vector3 position
)
```

Returns the nearest point on the collider to the given position.

**Parameters**:

* **collider** The collider.
* **position** Query position.

**Return**: Closest point on the collider.

### function Enabled

```csharp
static void Enabled(
    UnityEngine.Collider collider,
    bool enable
)
```

Enables or disables the collider.

**Parameters**:

* **collider** The collider.
* **enable** True to enable.

### function Bounds

```csharp
static Bounds Bounds(
    UnityEngine.Collider collider
)
```

Returns the collider's world-space bounds.

**Parameters**:

* **collider** The collider.

**Return**: World-space bounds.

### function SetHeight

```csharp
static void SetHeight(
    UnityEngine.CapsuleCollider collider,
    float height
)
```

Sets a capsule collider's height.

**Parameters**:

* **collider** The capsule collider.
* **height** New height.

### function SetRadius

```csharp
static void SetRadius(
    UnityEngine.CapsuleCollider collider,
    float radius
)
```

Sets a capsule collider's radius.

**Parameters**:

* **collider** The capsule collider.
* **radius** New radius.

### function SetCenter

```csharp
static void SetCenter(
    UnityEngine.CapsuleCollider collider,
    UnityEngine.Vector3 center
)
```

Sets a capsule collider's center offset.

**Parameters**:

* **collider** The capsule collider.
* **center** New center offset.

***

Updated on 2026-07-22 at 12:00:00 +0800
