<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCDevicePhysicalInput/inputState(forSpatialAccessoryAnchorTimestamp:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(pl)GCDevicePhysicalInput(im)inputStateForSpatialAccessoryAnchorTimestamp:"
  },
  "title" : "inputState(forSpatialAccessoryAnchorTimestamp:)"
}
-->

# inputState(forSpatialAccessoryAnchorTimestamp:)

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

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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)