Beginner: Track a device's current state

Interactions in any device running Fologram are triggered by device ‘States’ such as pressing, holding and dragging. These states can be tracked using Fologram’s 'Track State component, and are most powerful when used in conjunction with the ‘State Gate’ component to trigger events in a grasshopper document based on device gestures.

HoloLens Device States:

  • Detected - Activated when the pointers become active in the HoloLens’ FOV
  • Press - A pressed state is detected from an air tap in the HoloLens
  • Hold - Occurs when an air tap is held
  • Drag - Occurs when an air tap and drag motion is activated and currently in motion
  • Release - Occurs when a device has been released from a Pressed/Hold/Drag state in the HoloLens when releasing an air tap gesture
  • Lost - Occurs when the pointers are no longer in the device’s FOV

Mobile Device States:

  • Detected - Activated when the screen is tapped
  • Press - A pressed state is detected from a screen tap from a mobile device
  • Hold - Occurs when the screen is pressed and held
  • Drag - Occurs when the screen is pressed and a drag motion is activated and currently in motion
  • Release - Occurs when a device has been released from a Pressed/Hold/Drag state on mobile by lifting from pressing the screen
  • Lost - Occurs when a device is no longer pressed by lifting from pressing the screen

Example File:
This example file simply connects a Track State component to all recorded devices to track each devices current state. When a state is triggered, it appears as a text output.
1.16 Track State.gh (2.9 KB)