<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothBodyEvents/NewSimulationPositions/withLocalSpacePositions(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C10BodyEventsO22NewSimulationPositionsV014withLocalSpaceH0yxxs4SpanVys5SIMD3VySfGGXElF"
  },
  "title" : "withLocalSpacePositions(_:)"
}
-->

# withLocalSpacePositions(_:)

Provides access to the new simulation positions of the body’s particles, in local space.

```
func withLocalSpacePositions<Result>(_ body: (Span<SIMD3<Float>>) -> Result) -> Result
```

## Parameters

`body`

A closure that receives a span over the local-space particle positions.

## Return Value

The value returned by `body`.

## Discussion

The provided span is only valid for the lifetime of the callback.

---

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)