Grab
Grab nodes, as the name implies, requires a user to grab an object to progress. This could be grabbing a tool, a walkie talkie or even a fire extinguisher. Find an example of this already set up for you in Assets > open-xr-template-core > Prefabs > Preset Objects
Setup
Follow these steps to set up a new grabbable object that will progress the user in the graph when grabbed at the required step.
Scene Setup:
Start with a GameObject you'd like to be able to grab. This could be a cube for example.
Attach a “Guid Component” script.
Attach a “Collider” Component.
Attach a “Rigidbody” Component.
Attach the “Grabbable Open XR” script.
Attach the “Grabbable Middleman” script.
Graph Setup:
Open your graph. (In your module hierarchy go to Managers > Game Manager, In the inspector find the component called “Graph Flow Manager” and double click the Node Graph.
Right click and Create a new grab node (Steps → Grab).
Reference the grabbable middleman on the step.
That's it. Now when a user is on the Grab step, when they grab the newly made object they will complete the step.
Attach Transform
In the provided Grabbable Sample Prefab you will notice a child GameObject called Attach Point, this will be where a user will precisely hold the object once grabbed. For example if you wanted to set up a baseball bat you would move this transform to be in line with the bats handle.
For more information on the other inputs and outputs found on this node see Steps