XR Step-by-Step 2024! Meta Quest: Grab, Poke and Throw Interactables

Virtual Reality (VR), Augmented Reality (AR), Mixed Reality (MR) and now Spatial Computing all come together as XR or “Extended-Reality”.
You’re in the right place at the right time to build something amazing in XR!

In this blog post series we will focus on Meta Quest!

Check out other blog articles in this (and other) series!
Quick links to Lance’s latest XR Step-by-Step blog articles by device

Previously we setup our project and added both hands and controllers, now let’s add more things to interact with — we call these interactables. We’ll be adding Grab Interaction, Distance Grab, Poke Interaction and Throwable Items!

Add More Colored Materials

First was want to add some more materials that we can use to color our objects — so as a reminder here is how to add a material – I’ll add blue – then do the same to add green, black and white.

  1. (Project) Click _Materials folder
  2. (Project Files) Right-Click to bring up the menu
  3. (Menu) Create -> 4. Material
  1. (Project) Click the Material that you just created and named
  2. (Inspector) Click Base Map
  3. (Color) Drag the cursor to the color you want!

Add a Floor

Add a surface to walk, teleport and bounce items off!

  1. (Hierarchy) Right-Click to bring up the menu
  2. (Menu) Click 3D Object -> 3. Plane
  1. (Hierarchy) Click the Plane
  2. (Project) Drag Black on to the Plane in the Scene window
  3. (Inspector) Change the Position to 0, 0, 0 for X, Y, Z

Add Grab interaction

Same as we did at the end of our project setup, let’s add another cube that we can reach out and grab.

  • Click the Meta icon in the bottom right corner of the screen
  • Click Building Blocks
  1. (Building Blocks) Click the Gear icon
  2. Click Show Depreciated blocks
    • We’re doing this as the Throwable Item is currently depreciated as they added a click box in the Grab Interaction that is “supposed” to provide the throwable functionality — haven’t figured out yet why it’s not working for me… if you figure it out – let me know!
  3. (Building Blocks) Click the Interaction filter — just makes it easier to get to the interactable items
  4. (Building Blocks) Click Add Block for Grab Interaction
  1. (Hierarchy) Click your new Cube
  2. (Project) Drag the Blue material onto your new Cube
  3. (Inspector) Change the Position to 0.2, 1, 0.6 for X, Y, Z — this puts it next to our other cube

Add Distance Grab

Think of this like a “force grab” from Star Wars – you point your hand at the object – and click – and it flies to your hand. Awesome addition is that they show an transparent version of the object in your hand before you distance grab it!

  • (Building Blocks) Click Add Block for Distance Grab
  • (Distance Grab) Couple options for Mode — let’s choose Pull Interactable To Hand for now – but encourage you to add more blocks with each Mode type
  • (Distance Grab) Click Confirm
  1. (Hierarchy) Click your new Cube
  2. (Project) Drag the Green material onto your new Cube
  3. (Inspector) Change the Position to 0.4, 1, 0.6 for X, Y, Z — this puts it next to our other cubes

Add Throwable Item

One of my favorite things to do in XR is to experience physics between objects – no better way to do that than to be able to pick something up and throw it… 🙂

  • (Building Blocks) Click Add Block for Throwable Item
  1. (Hierarchy) Click your new Throwable Item
  2. (Project) Drag the White material onto your new Throwable Item
  3. (Inspector) Change the Position to 0.6, 1, 0.6 for X, Y, Z — this puts it next to our other cubes

Add Poke Interaction

The poke interaction is in essence a button, but can be any object that you poke and something happens!

  • (Building Blocks) Click Add Block for Poke Interaction
  1. (Hierarchy) Click your new Throwable Item
  2. (Project) Drag the White material onto your new Throwable Item
  3. (Inspector) Change the Position to 0.6, 1, 0.6 for X, Y, Z — this puts it next to our other cubes

Try them out!

Note — having some issues with the Throwable Item (probably because it’s depreciated and scripts have changed in the newest version <grin>) — but everything else works great. I’ll be working on getting throwable working and will be posting updates.

Run it and try!

Leave a Reply