---
title: "selectSubject(at:)"
framework: dockkit
role: symbol
role_heading: Instance Method
path: "dockkit/dockaccessory/selectsubject(at:)"
---

# selectSubject(at:)

Selects a subject to track at the supplied coordinates.

## Declaration

```swift
final func selectSubject(at unitPoint: CGPoint) async throws
```

## Discussion

Discussion There may be times when more than one subject is in a video frame. Use this method to track a specific subject within that frame by passing a  location within the frame. The coordinates are relative to the top left of the video frame, and are values between 0 and 1. If the framework doesn’t detect a subject at the passed coordinates, the method throws an error. If you disable system tracking, this configuration change applies to any custom tracking for this dock accessory. The configuration applies to any camera stream the app has open if system tracking is enabled. Call this method when implementing your own custom tracking behavior. note: DockKitError.notConnected if device isn’t docked, or other errors if no subject is found at the position.

## See Also

### Selecting and tracking

- [track(_:cameraInformation:)](dockkit/dockaccessory/track(_:camerainformation:)-4yl9b.md)
- [track(_:cameraInformation:)](dockkit/dockaccessory/track(_:camerainformation:)-44mwn.md)
- [DockAccessory.Observation](dockkit/dockaccessory/observation.md)
- [DockAccessory.CameraInformation](dockkit/dockaccessory/camerainformation.md)
- [DockAccessory.CameraOrientation](dockkit/dockaccessory/cameraorientation.md)
