Helpers
Interaction Kit helper components for SPECS: audio, color, outline, and squish feedback for Interactables, plus a ScreenTransform adapter and a proximity sensor.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported
- SPECSFully supported
- Camera Kit WebNot supported
- Camera Kit MobileNot supported
Interaction Kit includes helper components with common callback logic, such as a sound when an Interactable is triggered or a color change when it is hovered. Add a feedback helper to a scene object that has an Interactable: it reacts to the Interactable on its own scene object.
The helpers also serve as a reference for writing your own components that work with Interaction Kit's components and modules, so you can build feedback of your own for your SPECS Lenses.
Interaction Kit feedback helpers
| Component | What it does |
|---|---|
| InteractableAudioFeedback | Plays a sound when a trigger on the Interactable starts and when it ends. |
| InteractableColorFeedback | Changes the color of mesh visuals when the Interactable is hovered, pinched, or disabled. |
| InteractableOutlineFeedback | Adds an outline to mesh visuals when the Interactable is hovered or pinched, with a color and thickness you set. |
| InteractableSquishFeedback | Squishes a scene object when the Interactable is hovered or triggered, by amounts you set on the X and Y axes. |
InteractableOutlineFeedback and InteractableSquishFeedback have inputs that must be filled in: an empty one throws when the Lens starts.
Other Interaction Kit helpers
| Component | What it does |
|---|---|
| ScreenTransformAdapter | Adapts a scene object's transform to a ScreenTransform when the object is a child of a Canvas, keeping its position and rotation. |
| ProximitySensor | A spherical sensor that keeps the set of colliders inside its Radius (in centimeters). Turn on Track Distances to also get the distance from the sensor's center to each collider. With the system's interaction runtime it reports only the colliders of Interactables; in the Lens Studio Preview panel it reports any overlapping collider. To keep only Interactables in both, look each collider up with IK.InteractionManager.getInteractableByCollider(). |
The ToggleFeedback, SliderFeedback, and CapsuleMeshCustomizer helpers of earlier versions
belonged to UI components that Interaction Kit 4.0.0 no longer has; themed controls are in
UI Kit.
Related
- Interaction System: the Interactable events the feedback helpers react to.
- Components List: every Interaction Kit component with its module path.
- UI Kit: themed buttons, toggles, and sliders.