Beginner Tutorial


Adding VR Grab Capabilities with Oculus Rift and HTC Vive


15 minutes

Posted on: July 31, 2018

Learn Sumerian
Adding VR Grab Capabilities with Oculus Rift and HTC Vive

Tags

vr
grabbing
controllers

In this tutorial you will learn about:

grabbing capabilities
using VR
controllers

NOTE: Going forward, we do not recommend using this and related tutorials (CoreVR asset pack) for VR functionality. Please see use the new VR Asset Pack for adding VR to your scene.

This tutorial shows how to add virtual reality (VR) grabbing capabilities, using the controllers of the Oculus Rift or HTC Vive, to a scene in Amazon Sumerian.

Prerequisites

Before you begin, you should have completed the following tasks and tutorials:

Step 1: Create a New Scene

From the Dashboard, load a scene that has completed the steps found in the Getting Started in VR tutorial.

Step 2: Add Grabbing Functionality

  1. In the Entities panel, select controller_O_Left. Navigate to the Inspector panel and add a Script component.
  2. Filter the Assets panel by Scripts, and then drag the Grab script onto the drop zone of the Script component.
  3. Add the Grab script to each of the other controllers: controller_O_Right, controller_V_Left, controller_V_Right.

Step 3: Test Your Scene

In this last step, you’ll test the grabbing capability with a primitive Box entity.

  1. Choose Create Entity above the canvas, and then add a Box entity.
  2. In the Entities panel, select the Box entity. In the Inspector panel, choose Add Component.
  3. Choose the Collider component.

  4. Press play, and then press the Enter VR button.
  5. When you’re within reach of the Box, press the button you’ve defined as your “grab” button on Oculus or Vive to grab the Box. Release the button to release the Box.

    Note: You can also customize the button actions in the drop-down list of the Grab script.

  6. Press the VR button to exit VR mode, and then click the stop button to exit play mode

Now publish and share your scene!

Now that you understand more about scenes in VR, try the following tutorial:

Back to Tutorials

© 2019 Amazon Web Services, Inc or its affiliates. All rights reserved.