Skip to content

Grab Events

See ExampleScripts Grab\_Events to see how to trigger an event when you grab an object or release it.  This example will save a flag to the trial_data file with the name of the object and when it was grabbed or released along with the timestamp and the rest of the trial_data. If you have BIOPAC enabled, it will also send a synchronized event to Acqknowledge. 

To set objects as grabbable can click the checkbox in the GUI for grabbable (see creating a new scene) or add to the sceneObjects Dictionairy with code: 

basketball = env.getChild('basketball')

sightlab.addSceneObject('basketball',basketball,gaze = True, grab = True)

Grab and Release events (with the name of the object) are also automatically stored in the trial_data tracking file and sent to Acqknowledge if using BIOPAC.

Note: Grabbing by default is set to the right and left trigger buttons for VR controllers, left mouse button with the mouse, or if using the Vive Focus Vision can just use hand tracking and a "click" gesture (holding index finger and thumb together). Lastly, you can also use "physics" based tracking that uses intersections with objects and hand tracking. See this page for details on that.

Was this page helpful?