---
title: ClothGrabComponent
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/clothgrabcomponent
---

# ClothGrabComponent

A component that grabs and drags particles of cloth bodies using either a ray or a volume, as determined by the mode property.

## Declaration

```swift
struct ClothGrabComponent
```

## Overview

Overview When isGrabbing is first set to true, a selection is made using the ray/volume. While isGrabbing remains true, the selected particles will be dragged to the position determined by the ray/volume. When isGrabbing is set to false, any selected particles are released and will once again be controlled by the simulation. To smoothen the motion of particles dragged using a volume, falloff can be set to .enabled. This causes the strength of the particle dragging to fall off based on the distance from the volume surface.

## Topics

### Creating a grab component

- [init(mode:)](realitykit/clothgrabcomponent/init(mode:).md)
- [ClothGrabComponent.GrabMode](realitykit/clothgrabcomponent/grabmode.md)

### Configuring the falloff

- [falloff](realitykit/clothgrabcomponent/falloff-swift.property.md)
- [ClothGrabComponent.Falloff](realitykit/clothgrabcomponent/falloff-swift.struct.md)

### Checking the grab state

- [isGrabbing](realitykit/clothgrabcomponent/isgrabbing.md)

### Instance Properties

- [mode](realitykit/clothgrabcomponent/mode.md)

## Relationships

### Conforms To

- [Component](realitykit/component.md)

## See Also

### Simulation and bodies

- [ClothSimulationComponent](realitykit/clothsimulationcomponent.md)
- [ClothBodyComponent](realitykit/clothbodycomponent.md)
- [ClothBodyMaterial](realitykit/clothbodymaterial.md)
- [ClothForceVolumeComponent](realitykit/clothforcevolumecomponent.md)
- [ClothQueryVolumeComponent](realitykit/clothqueryvolumecomponent.md)
- [ClothCoordinateSpace](realitykit/clothcoordinatespace.md)
- [PerClothVertexData](realitykit/perclothvertexdata.md)
