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.
Before you begin, you should have completed the following tasks and tutorials:
- Sign in to Amazon Sumerian with your AWS account
- All Amazon Sumerian Getting Started tutorials
- Getting Started in VR tutorial
- Teleporting in VR tutorial
- Set up Oculus Rift or HTC Vive on your computer
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
- In the Entities panel, select controller_O_Left. Navigate to the Inspector panel and add a Script component.
- Filter the Assets panel by Scripts, and then drag the Grab script onto the drop zone of the Script component.
- 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.
- Choose Create Entity above the canvas, and then add a Box entity.
- In the Entities panel, select the Box entity. In the Inspector panel, choose Add Component.
Choose the Collider component.
- Press play, and then press the Enter VR button.
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.
- Press the VR button to exit VR mode, and then click the stop button to exit play mode
Now publish and share your scene!
Related Tasks and Tutorials
Now that you understand more about scenes in VR, try the following tutorial: