---
title: "init(height:radius:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/clothcapsuleshape/init(height:radius:)"
---

# init(height:radius:)

Creates a capsule shape with the given height and radius.

## Declaration

```swift
init(height: Float, radius: Float)
```

## Parameters

- `height`: The length of the cylinder portion of the capsule.
- `radius`: The radius of the cylinder portion and each hemisphere.
