> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksiunitycollider.md).

# Interface ksIUnityCollider

Namespace: [KS.Reactor.Client.Unity](/reactor/api-reference/ks.reactor.client.unity.md)\
Assembly: KSUnity-Source.dll

Interface for getting data from our colliders or Unity's colliders.

```csharp
public interface ksIUnityCollider : ksICollider
```

#### Implements

[ksICollider](/reactor/api-reference/ks.reactor/ks.reactor.ksicollider.md)

## Properties

### Center <a href="#ks_reactor_client_unity_ksiunitycollider_center" id="ks_reactor_client_unity_ksiunitycollider_center"></a>

Get the collider center.

```csharp
Vector3 Center { get; }
```

#### Property Value

Vector3

### Collider <a href="#ks_reactor_client_unity_ksiunitycollider_collider" id="ks_reactor_client_unity_ksiunitycollider_collider"></a>

The collider this interface is for.

```csharp
Collider Collider { get; }
```

#### Property Value

Collider

### Component <a href="#ks_reactor_client_unity_ksiunitycollider_component" id="ks_reactor_client_unity_ksiunitycollider_component"></a>

The component this interface is for.

```csharp
Component Component { get; }
```

#### Property Value

Component

### Existance <a href="#ks_reactor_client_unity_ksiunitycollider_existance" id="ks_reactor_client_unity_ksiunitycollider_existance"></a>

Does this collider exist on the client, server, or both? Note that this only affects whether or not the collider is written to server configs during publishing or whether the collider is deleted on the client when the entity is spawned and may not be indicative of the current existance of the collider on the server at runtime.

```csharp
ksExistenceModes Existance { get; }
```

#### Property Value

[ksExistenceModes](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksexistencemodes.md)

### Material <a href="#ks_reactor_client_unity_ksiunitycollider_material" id="ks_reactor_client_unity_ksiunitycollider_material"></a>

Physics material.

```csharp
PhysicMaterial Material { get; }
```

#### Property Value

PhysicMaterial

### ShapeType <a href="#ks_reactor_client_unity_ksiunitycollider_shapetype" id="ks_reactor_client_unity_ksiunitycollider_shapetype"></a>

Get the collider shape type.

```csharp
ksShape.ShapeTypes ShapeType { get; }
```

#### Property Value

[ksShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md).[ShapeTypes](/reactor/api-reference/ks.reactor/ks.reactor.ksshape/ks.reactor.ksshape.shapetypes.md)

## Methods

### GeometricCenter() <a href="#ks_reactor_client_unity_ksiunitycollider_geometriccenter" id="ks_reactor_client_unity_ksiunitycollider_geometriccenter"></a>

Gets the geometric center of the collider in local space.

```csharp
Vector3 GeometricCenter()
```

#### Returns

Vector3

Geometric center of the collider.

### IsGeometryEqual(ksIUnityCollider) <a href="#ks_reactor_client_unity_ksiunitycollider_isgeometryequal_ks_reactor_client_unity_ksiunitycollider" id="ks_reactor_client_unity_ksiunitycollider_isgeometryequal_ks_reactor_client_unity_ksiunitycollider"></a>

Compare the geometry sources of each collider and return true if they are equal.

```csharp
bool IsGeometryEqual(ksIUnityCollider other)
```

#### Parameters

`other` [ksIUnityCollider](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksiunitycollider.md)

Collider to compare to.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True if the collider geometry is equal.

### Serialize() <a href="#ks_reactor_client_unity_ksiunitycollider_serialize" id="ks_reactor_client_unity_ksiunitycollider_serialize"></a>

Serializes the collider by shape type.

```csharp
byte[] Serialize()
```

#### Returns

[byte](https://learn.microsoft.com/dotnet/api/system.byte)\[]

Serialized collider data.

### Volume() <a href="#ks_reactor_client_unity_ksiunitycollider_volume" id="ks_reactor_client_unity_ksiunitycollider_volume"></a>

Gets the volume of the collider.

```csharp
float Volume()
```

#### Returns

[float](https://learn.microsoft.com/dotnet/api/system.single)

Volume of the collider.
