3/28/2023 0 Comments Templar teleport locationsAdd a Line Renderer to CenterEyeAnchor by clicking “Add Component” in the inspector and typing “Line Renderer” in the search box. Next, add a laser beam that extends from the controller. If both hands are set correctly, the controller will automatically be displayed for the correct hand when you run the scene. Make sure the Controller field of the TrackedRemote instance under LeftHandAnchor is set to “L Tracked Remote.” The instance under RightHandAnchor should be set to “R Tracked Remote.” You can do this in the Unity inspector. When you run this scene, the correct controller model is displayed depending on which headset you’re using. TrackedRemote contains models for both the Gear VR controller and the Oculus Go controller. Create instances of TrackedRemote as children of OVRCameraRig->TrackingSpace -> LeftHandAnchor and OVRCameraRig -> TrackingSpace -> RightHandAnchor. Now add the controller using the Assets/Oculus/Prefabs/TrackedRemote prefab. Rename this instance CenterEyeAnchor and nest it under OVRCameraRig -> TrackingSpace. Drag Assets/VRSampleScenes/Prefabs/Utils/MainCamera from the project window to the hierarchy. Set the position of OVRCameraRig to (0, 1.8, 0) to approximate the height of a person.ĬenterEyeAnchor is the placeholder for our camera that we will replace with the MainCamera prefab included in VR Sample Scenes. Expand OVRCameraRig, and you’ll see that it contains a TrackingSpace with anchors for the eyes and hands. We will be using a custom camera.Ĭreate an instance of the OVRCameraRig prefab included in Oculus Utilities by dragging Assets/Oculus/VR/Prefabs/OVRCameraRig from the project window to the hierarchy window. First, remove the Main Camera object that was created by default. Let’s start by setting up a VR camera and adding controller support. Then, in the Oculus mobile app, choose the headset you’re using from the Settings menu, select More Settings, and toggle Developer Mode. First, you need to create an organization in your Oculus account at. You will also need to activate Developer Mode if you are using an Oculus Go. In your phone settings, go to “About Device” and tap seven times on “Build number.” If you are using the Gear VR, you will need to activate Developer Mode on your phone to test your app. The folders VRSampleScenes and VRStandardAssets will be created in your Assets folder. Click on the Asset Store tab in Unity, and search for “VR Samples.” When loaded, click the import button and follow the instructions to import this package. This package includes a number of sample scenes as well as prefabs and scripts that we will customize to add a laser pointer and reticle. We will also need the VR Samples package from the Unity Asset Store. This error probably does not occur on Windows. You can find a fixed copy of OVRPlugin.cs in the included source. If you get the error message “‘OVRP_1_15_0’ does not exist in the current context,” open Assets/Oculus/VR/Scripts/OVRPlugin.cs and add #if !OVRPLUGIN_UNSUPPORTED_PLATFORM and #endif around code that checks the OVRPlugin version. If you expand TrackedRemote in the project view, you’ll see that it contains prefabs for the Gear VR and Oculus Go controllers. Oculus/Prefabs contains the OVRCameraRig and TrackedRemote prefabs that we will use to implement controller support. If you are prompted to update the package, follow the prompts to install the update and restart Unity.Ī folder named Oculus will be created in your project. Import Oculus Utilities into your project by selecting Assets -> Import Package -> Custom Package within Unity and choosing the location of the package you extracted. Add Oculus under Virtual Reality SDK’s and select API Level 19 as the Minimum API Level.ĭownload Oculus Utilities from and extract the zip file on your computer. Click on Player Settings to load PlayerSettings in Unity inspector. Select File -> Build Settings from the menu and choose Android as the platform. Create the folder Assets/Plugins/Android/assets within the project, and copy your phone’s Oculus signature file there. To get started, create a new Unity project, Teleporter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |