---
title: "init(mesh:bias:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/clothcollidercomponent/init(mesh:bias:)"
---

# init(mesh:bias:)

Creates a cloth collider component with a mesh shape built from the given mesh resource.

## Declaration

```swift
init(mesh: ClothMeshResource, bias: Float)
```

## Parameters

- `mesh`: Defines the mesh resource to use for the shape of the collider.
- `bias`: The distance by which the mesh vertices are extended outwards along the direction of their normals.

## See Also

### Creating a cloth collider

- [init(shape:)](realitykit/clothcollidercomponent/init(shape:).md)
- [init(meshShape:)](realitykit/clothcollidercomponent/init(meshshape:).md)
