# ColliderShape.Capsule record

> A collider shape that's a capsule, a cylinder with a half sphere on each end, centred on the collider's origin and running along its Y axis. Its whole length is its Height and twice its Radius.

Namespace `EvilEngine.Formats.Collision`, assembly `EvilEngine.Formats`. Engine commit 4ff877b1.

```csharp
public sealed record ColliderShape.Capsule : ColliderShape
```

A [collider shape](/docs/api/collidershape) that's a capsule, a cylinder with a half sphere on each end, centred on the collider's origin and running along its Y axis. Its whole length is its [Height](#height) and twice its [Radius](#radius).

```csharp
new Collider(new ColliderShape.Capsule(1.2f, 0.3f), ["solid"])
```

## Members

### ColliderShape.Capsule (constructor)

```csharp
public ColliderShape.Capsule(float Height, float Radius)
```

Makes a capsule of `height` between its ends' centres and `radius`.

### Height (property)

```csharp
public float Height { get; init; }
```

The distance between the centres of its two round ends, in metres, the length of its straight part. It must be above 0 for the collision to be written.

### Radius (property)

```csharp
public float Radius { get; init; }
```

The radius of its straight part and its ends, in metres. It must be above 0 for the collision to be written.
