---
title: "withLocalSpacePositions(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/clothbodyevents/newsimulationpositions/withlocalspacepositions(_:)"
---

# withLocalSpacePositions(_:)

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

## Declaration

```swift
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

Return Value The value returned by body.

## Discussion

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

## See Also

### Accessing local space positions

- [localSpacePositions](realitykit/clothbodyevents/newsimulationpositions/localspacepositions.md)
