---
title: "init(source:target:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/attachedtransformcomponent/init(source:target:)"
---

# init(source:target:)

Creates an AttachedTransformComponent with an optional source pin and a target pin

## Declaration

```swift
init(source: GeometricPin? = nil, target: GeometricPin)
```

## Parameters

- `source`: The optional source pin existed on the current entity
- `target`: The target pin existed on the target entity
