Basic VR Usage
World Political Map Globe Edition works great in VR. When using it with a VR headset, two different modes can be used:
“Inverted Mode” which sits you at the center of the globe and it rotates around you. This option is located under the Earth style in the inspector and automatically enables VR compatibility (you don’t need to configure anything else). Note that this option is not available for all Earth styles.
“Normal Mode”. This is the mode where you see the entire Earth in front of you. In this case you need to verify that the “VR Enabled” parameter is checked (located at bottom of inspector).
To enable VR raycasting support, check the VR Enable toggle under Devices section of WPM Globe inspector.
This is enough to support basic virtual reality platforms such us Google VR compatible devices, Gear VR, and others.
Custom Gazes & Pointers
Unity’s VR Samples Gaze & VREyeRayCast
WPM Globe Edition also supports gaze selections through VREyeRayCast, included in Unity VR Samples. With VREyeRayCast, WPM Globe will properly hide current selection if the gaze is over a interactable element (like a menu). To support VREyeRayCast, you need to import these VR scripts from Unity and also edit WPMInternal.cs and uncomment the line that reads:
Google VR Pointer & Controller Touch
To enable country selection and globe interaction using controller touch edit WPMInternal.cs and uncomment the line that reads:
Samsung Gear VR Pointer (old API)
To enable country selection and globe interaction using Samsung Gear VR pointer (laser) uncomment the line that reads:
Oculus Plugin Integration (Go / Quest) Controllers
To enable globe interaction using Go/Quest controllers, uncomment the line in WPMInternal.cs script that reads:
Important! Make sure the Oculus plugin is present in your project (install it from Asset Store or from the Oculus developer site).
This enables integration with the controllers:
- The Earth cursor will move according to the controller direction (Note: no laser is drawn).
- Dragging over the touchpad (Go) or with Thumbstick (Quest) will rotate the Earth.
- Clicking the touchpad (Go) will center the Earth on the current country/province.
- Pulling the controller trigger will raise a normal click (as with mouse).
- Zoom in/out can be performed on the Quest controller by holding the primary hand trigger while moving up/down the thumbstick
If you have rendering issues using Oculus Plugin:
- v18 of Oculus Plugin has some issues with Unity 2018.4 and later. Try downloading v17 from Oculus website.
- Select OVRCameraRig and disable “Use Recommended MSAA Level” in the OVRManager script.
Test/Walk-through with Oculus Quest
- Create an empty project. Switch to Android.
- Configure project for VR. Go to Project Settings and under XR, install the XR Management Plugin. Also install the Oculus support in the Android tab under the XR Management section.
- Import World Political Map Globe Edition asset.
- Import Oculus Plugin from the Asset Store.
- If you receive any message to upgrade, click “Yes” (upgrade).
- Open demo scene 1 of the globe asset.
– Remove the camera and drag & drop the OVRCameraRig from the Oculus/VR/Prefabs folder.
– Unselect “Use Recommended MSAA level” in the OVR Manager script.
- Select the WorldMapGlobe gameobject and move it a bit forward to position (0,0,10) so it appears full in front of the camera. Scroll down and select:
– Allow User Rotation / Mode = Earth Rotates
– Allow User Zoom / Mode = Earth Moves
– Distance Max = 20
- As explained above, edit WPMInternal.cs and uncomment the #define VR_OCULUS macro.
- Build the app. Go to Player settings and switch Android minimum API version to 7 at least. You may want to remove many of the 8K/16K textures included in the globe / Resources / Textures folder to speed up the build process.
- Run the app on the Oculus Quest.
On the Oculus Quest using the right hand controller you will be able to control the pointer. Use the thumbstick to rotate the Earth. Hold the lateral button and move the thumbstick up/down to control zoom.