---
title: "offsetBy(rotation:translation:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/shaperesource/offsetby(rotation:translation:)"
---

# offsetBy(rotation:translation:)

Creates a new shape resource by applying a rotation and a translation.

## Declaration

```swift
@MainActor @preconcurrency func offsetBy(rotation: simd_quatf = simd_quatf(ix: 0, iy: 0, iz: 0, r: 1), translation: SIMD3<Float> = SIMD3<Float>()) -> ShapeResource
```

## Parameters

- `rotation`: The rotation to apply to the existing shape resource.
- `translation`: The translation to apply to the existing shape resource.

## Return Value

Return Value The transformed resource.

## See Also

### Transforming a shape

- [offsetBy(rotation:)](realitykit/shaperesource/offsetby(rotation:).md)
- [offsetBy(translation:)](realitykit/shaperesource/offsetby(translation:).md)
