CustomControllers Sample Scene

Important

All Oculus Quest developers MUST PASS the concept review prior to gaining publishing access to the Quest Store and additional resources. Submit a concept document for review as early in your Quest application development cycle as possible. For additional information and context, please see Submitting Your App to the Oculus Quest Store.


We're no longer accepting submission of 32-bit Oculus Quest apps. Any new or updated Oculus Quest application needs to be 64-bit. Please contact Oculus if you are unable to comply with this policy. Oculus Go and Gear VR apps will not be affected by this change.

The Unity CustomControllers sample scene demonstrates how to implement custom controller models as a user’s hands. Oculus Avatars come with the ability to hold controllers, but you can implement them yourself if you are not using avatars.

In this scene, the user has a pair of custom controllers that can be moved around. There are no hands, but the buttons and triggers do react when pressed.

The goal of this topic is to help you use the prefabs and components that make custom controllers work. You can also use this sample scene as a starting point for your own application.

Scene Walkthrough

This section briefly describes the prefabs that make the core functionality of this scene work.

  • LeftControllerPf and RightControllerPf prefabs - Prefabs that contain the necessary component for custom controllers.

LeftControllerPf and RightControllerPf Prefabs

These prefabs are used to implement custom controllers. Each has only one component, Touch Controller, which implements the custom controller models, specifies their controller assignment, and handles animation of the buttons. Its properties are as follows:

  • Controller - Physical controller that the custom VR controller is attached to.
  • Animator - Model and animation information for the custom controller.

Using in Your Own Apps

Adding custom controllers requires you to add the LeftControllerPf and RightControllerPf prefabs. They come equipped with models and animators you can use and modify in your own applications.

Note the importance of placement of the prefabs in the Hierarchy. If the LeftControllerPf and RightControllerPf prefabs are not child objects of LeftHandAnchor and RightHandAnchor, the controllers will not appear in front of you as though they were attached to your hands.