| name | snap-spectacles-sik |
| description | Load when the user is wiring pinch, poke, gaze, or two-handed manipulation on Snap Spectacles โ building AR buttons, sliders, draggable objects, scrollable lists, custom interactors, or asks "why isn't my Interactable firing." Don't load for general Lens Studio scene setup โ use snap-spectacles-build. |
| license | MIT |
| metadata | {"author":"HKTITAN","version":"1.0.0","graph":true,"depends":["snap-spectacles-build"]} |
Spectacles Interaction Kit (SIK)
SIK is the canonical way to wire interactions on Spectacles. The architecture is three classes โ Interactor, Interactable, InteractionManager โ and a handful of UI prefabs. Once the model clicks, everything from pinch buttons to two-handed scaling falls into the same shape.
When to load
Triggers:
- "Why isn't my pinch button firing on Spectacles"
- "AR draggable Spectacles"
- "Two-handed scale on Spectacles"
- "Custom interactor SIK"
- "PinchButton trigger event"
- "Spectacles raycast interaction"
- "Spectacles cursor"
Don't load for:
- General Lens Studio basics โ see [[../snap-spectacles-build/SKILL]].
- Multiplayer / shared interactions โ see [[../snap-spectacles-sync/SKILL]].
- Mobile controller pairing for non-interaction reasons โ see [[../snap-spectacles-mobile-kit/SKILL]].
Decide first
The architecture decisions before code:
- Near or far? Direct-pinch is near (~5 cm from the Interactable's collider). Far interaction needs the cursor / gaze-driven ray. See [[references/hand-interactor]] and [[references/cursor-interactor]].
- One hand or two? Two-handed manipulation is supported but requires
InteractableManipulation configured for two-handed. See [[references/manipulation]].
- UI element source. Build with SIK / UI Kit prefabs (Button, Toggle, Slider, Container) or write your own Interactable? Prefer prefabs first.
- Bubble-or-trickle. SIK fires events down the scene-graph tree from ancestors to targets and back up โ what catches the event? See [[references/event-cascading]].
Map of content
Architecture
- [[references/interaction-manager]] โ the central manager and the bubble/trickle event flow.
- [[references/event-cascading]] โ how events propagate through ancestor Interactables.
Interactors (input)
- [[references/hand-interactor]] โ direct-pinch and direct-poke; the near-field gesture model.
- [[references/cursor-interactor]] โ gaze-driven cursor for far interaction.
- [[references/mobile-interactor]] โ smartphone-as-controller, calibrated with Spectacles.
- [[references/hand-visualization]] โ visualising the user's hands in scene.
Interactables (targets)
- [[references/interactables]] โ Interactable component, collider requirements, states (hover, trigger).
- [[references/manipulation]] โ InteractableManipulation: translate, scale, rotate, two-handed.
- [[references/anchor-dynamics]] โ anchor / pinning so UI stays where the user puts it.
UI prefabs (composition)
- [[references/ui-buttons]] โ Button / PinchButton patterns and where the click really lands.
- [[references/ui-toggles]] โ Toggle component, state binding, accessibility.
- [[references/ui-sliders]] โ Slider and ScrollBar; the continuous-value pattern.
- [[references/ui-containers]] โ Container and ContainerFrame as the scene's UI organiser.
Custom
- [[references/custom-interactor]] โ when prefabs aren't enough; writing your own.
Verify
Before claiming an interaction works:
Smoke test
If this skill loaded correctly, the agent should answer:
- Why does an Interactable need a Collider component to receive events? (Expected: the Interactor raycasts against collider geometry; without a collider it can never be a hit; cites [[references/interactables]].)
- What's the difference between direct-pinch and indirect-pinch? (Expected: direct-pinch fires within ~5 cm of the Interactable's collider; indirect routes through a raycast / cursor; cites [[references/hand-interactor]] and [[references/cursor-interactor]].)
- Three reasons a pinch event might not fire on a properly-shaped Interactable. (Expected: collider too small / offset; no InteractionManager in scene; another Interactable ancestor is consuming the event in its bubble phase. Cites [[references/interactables]], [[references/interaction-manager]], [[references/event-cascading]].)
Sibling skills
- [[../snap-spectacles-build/SKILL]] โ the Lens Studio basics this skill assumes.
- [[../snap-spectacles-sync/SKILL]] โ for multi-user / networked interactions.
- [[../snap-spectacles-design/SKILL]] โ the UX layer on top of these mechanics.
Sources