<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothBodyComponent/TargetShape",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C13BodyComponentV11TargetShapeV"
  },
  "title" : "ClothBodyComponent.TargetShape"
}
-->

# ClothBodyComponent.TargetShape

Pulls particles of a cloth body toward positions in either local or simulation space.

```
struct TargetShape
```

## Topics

### Creating a target shape

[`init(for: ClothBodyComponent)`](/documentation/RealityKit/ClothBodyComponent/TargetShape/init(for:))

Creates a target shape that is compatible with the given [`ClothBodyComponent`](/documentation/RealityKit/ClothBodyComponent).

### Constraining vertex positions

[`var constraints: PerClothVertexData<ClothBodyComponent.TargetShape.PositionConstraint>`](/documentation/RealityKit/ClothBodyComponent/TargetShape/constraints)

The position constraints that pull the individual particles towards the target shape.

[`struct PositionConstraint`](/documentation/RealityKit/ClothBodyComponent/TargetShape/PositionConstraint)

A constraint that pulls a particle towards a certain position.

### Configuring the target shape

[`var weight: Float`](/documentation/RealityKit/ClothBodyComponent/TargetShape/weight)

The weight by which the body will be pulled towards this target shape.

[`var space: ClothCoordinateSpace`](/documentation/RealityKit/ClothBodyComponent/TargetShape/space)

The space in which the position constraints are defined.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)