User Tools

Site Tools


vr_unity

This is an old revision of the document!


Steps for VR

1. Install Unity from https://unity3d.com/get-unity/download 2. Install editor (v 2021.3.) > Install 3. Add ‘Android Support + Open JDK + Android SDK and NDK Tools’ > Continue 4. Agree> Install 5. New Project > 3D (URP) Setting up environment 1. Top right layout > Tall 2. Create scene, ‘Main scene’ 3. Create > 3D object > Plane 4. Right click in project window 5. Create > material Enable VR environment using oculus integration 1. Install oculus integration package here https://assetstore.unity.com/packages… 2. Edit> project settings> XR Plugin management 3. Select ‘Oculus’ in windows and android

Fun part – Hand tracking 1. Delete ‘main camera’ 2. Create > 3D object> cube 3. Search in project ‘OculusInteractionSampleRig’ 4. Drag ‘OculusInteractionSampleRig’ to scene 5. Select ‘OVRCameraRig’ 6. Change Tracking Origin Type to ‘Floor Level’ and Tracking support to ‘Hands only’ 7. Look for ‘Left/Right HandAnchor’ under ‘OVRCameraRig’

Grabbing Object Interactor 1. Add ‘HandGrabInteractor’ to both ‘HandInteractor’ under InputOVR 2. Select ‘R/L Hand’ drag ‘OVRGrabber’ to add elements in interactor 3. Check Parent Held Object or you will see some jumpiness when holding and object and moving your hands. 4. Add sphere collider to grab volume Interactable 1. Add ‘rigidbody’ to the cube under add components for a cube. 2. Add ‘OVRGrabbable’

vr_unity.1719663459.txt.gz · Last modified: 2024/06/29 13:17 by akanksha