text
stringlengths
0
1.11k
The Hierarchy should now be empty except for the Directional Light GameObject.
In the Project window search bar, enter OVRCameraRigInteraction. Ensure the search filter is set to either All or In Packages, since the default setting only searches your assets. The prefab’s file path is Packages/com.meta.xr.sdk.interaction.ovr/Runtime/Prefabs/OVRCameraRigInteraction.prefab.
Toggling the filterToggling the filter to search the installed packages for the OVRCameraRigInteraction prefab.
Drag the prefab from the search results into the Hierarchy.
Under Hierarchy, select OVRCameraRigInteraction > OVRCameraRig.
Under Inspector, in the OVR Manager component, if you want your app to support hand tracking, set Hand Tracking Support to either Controllers and Hands or Hands Only.
Enabling hand tracking
Prepare to launch your scene by going to File > Build Settings and clicking the Add Open Scenes button.
Your scene is now ready to build.
Select File > Build And Run, or if you have an Oculus Link connected, click Play.
The scene loads. The world is completely empty, but if you raise your hands or controllers, they should appear in front of you.
(Optional) Set up controller driven hands
This section is optional unless you want to replace controllers in your app with controller driven hands. Controller driven hands is an input method that uses your physical controllers for input but renders them as hands. This combines the increased immersion of hands with the benefits of controllers, like vibrations and physical feedback.
Unless otherwise noted, interactions that work for hands also work for controller driven hands.
Under Project, search for OVRControllerDrivenHands. Ensure the search filter is set to either All or In Packages, since the default setting only searches your assets.
Drag the OVRControllerDrivenHands prefab from the search results onto OVRInteraction in the Hierarchy.
Related topics
To learn about the key concepts in Interaction SDK, see the Architecture Overview.
Next steps
Add some GameObjects and make them interactable with Quick Actions.
ChatGPT
Ok.
User
Add an Interaction with QuickActions
Unity
All-In-One VR
Quest
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).
Haz clic aquí para ver la página del índice de la documentación para tu plataforma de preferencia.
QuickActions is a feature available in Interaction SDK v62 or higher that automates adding interactions to your scene. It takes the form of a set of right-click wizards that can apply changes to existing scene objects and the camera rig.
QuickActions is the recommended way to add interactions to your project if you’re using hands and controllers. QuickAction doesn’t support controller driven hands. Currently, QuickActions supports only grab, distance grab, ray, and poke interactions. QuickActions can only add ray and poke interactions to a canvas GameObject, not other types.
To add interactions not supported by QuickActions, see the Tutorials section in the sidebar. If you’re using a pre-v62 release of the SDK, it doesn’t support QuickActions, so you have to manually set up all interactions using the SDK’s Legacy tutorials.
Before you begin
Complete Getting Started with Interaction SDK.
Add an interaction
Once you complete Getting Started with Interaction SDK, your scene contains a working camera, hands, and controllers, but you need to add an object to interact with.
Open the Unity scene where you completed Getting Started with Interaction SDK.
Under Hierarchy, right-click and select 3D Object > the type of object you want to create (ex. Cube).
The object appears in the Hierarchy.
Note
Ray and poke interactions can only be added to canvas GameObjects, not other GameObject types.
Under Hierarchy, select the GameObject that should be interactable.
Right-click on the GameObject and select Interaction SDK > Add … Interaction (ex. Add Grab Interaction).
The quick actions menu.
The QuickActions menu.
The Quick Actions wizard appears.
In the Quick Actions wizard, select Fix All to fix any errors. This will add missing components or fields if they’re required.
The fix all option
If you want to further customize the interaction, adjust the interaction’s settings in the wizard. Some interactions don’t have additional settings for you to customize.
Select Create.
The wizard automatically adds the required components for the interaction to the GameObject. It also adds components to the camera rig if those components weren’t already there.
The automatically added GameObjects for a hand grab.
An example of the wizard adding components to the GameObject and camera rig for a hand grab interaction. Your hierarchy may look different depending on the interaction you chose and if your camera rig was missing components, like the rig in this image.Build a Custom Hand Pose
Unity
All-In-One VR
Quest
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).