---
title: "inputState(forSpatialAccessoryAnchorTimestamp:)"
framework: gamecontroller
role: symbol
role_heading: Instance Method
path: "gamecontroller/gcdevicephysicalinput/inputstate(forspatialaccessoryanchortimestamp:)"
---

# inputState(forSpatialAccessoryAnchorTimestamp:)

Returns the buffered input state that best aligns with the provided spatial accessory anchor timestamp.

## Declaration

```swift
func inputState(forSpatialAccessoryAnchorTimestamp timestamp: TimeInterval) -> (any GCDevicePhysicalInputState)?
```

## Parameters

- `timestamp`: The timestamp obtained from ar_accessory_anchor_get_timestamp for a spatial accessory anchor.

## Return Value

Return Value The buffered accessory input state that most closely aligns with the provided spatial accessory anchor timestamp.
