<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothBodyComponent/init(mesh:meshDraping:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C13BodyComponentV4mesh0F7DrapingAcA0C12MeshResourceC_AA0c4PoseI0CSgtcfc"
  },
  "title" : "init(mesh:meshDraping:)"
}
-->

# init(mesh:meshDraping:)

Creates a new cloth body component.

```
init(mesh: ClothMeshResource, meshDraping: ClothPoseResource? = nil)
```

## Parameters

`mesh`

The (simulation) mesh of the cloth body, which defines its at-rest shape.

`meshDraping`

An optional initial pose for the body.

## Discussion

The body component must be attached to an entity that is a descendant of a simulation root
(an entity with a [`ClothSimulationComponent`](/documentation/RealityKit/ClothSimulationComponent)) in order to be active.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)