What does the VR Simulator do?
The VR Simulator is an editor extension for Unity to make developing virtual reality scenes easier when you don't have (or feel like hooking up) a VR headset. As the name suggests, it simulates a VR environment for you by:
- Adjusting your scene's camera position to simulate what it would look like if an were controlling the camera,
- Moving and rotating your camera and/or play area in response to keyboard, mouse, gamepad, etc. input to simulate walking and looking through an HMD,
- Simulating (even if they're not hooked up or currently being tracked) in your scene,
- Moving your simulated position-tracked controllers to simulate hand movement in your scene.
That's the the heart of it. However, the VR Simulator's real strength is its easy configurability and the ability to flexibly simulate your VR experience. Using the Unity Editor, you can adjust the VR experience you're simulating in a variety of ways:
- Automatically detect headsets and controllers. The VR Simulator automatically detects the headset you're using (and differentiates between SteamVR/Vive and Oculus Rift) and which inputs are currently connected to your development machine. Then, it only starts simulating if simulation is necessary: If you're connected to an HMD, you'll get the "real" experience and if not, you'll get the simulation.
- Simulate different head heights. Out of the box, the VR Simulator can simulate a Seated, Standing, or Custom head height to let you playtest seated, standing, and room-scale VR experiences.
- Simulate controllers using primitives or prefabs. can either be simulated using configurable Unity primitives (spheres, cubes, etc.) or using any prefab. If your VR experience uses a custom controller model, you can use the same model in your simulations.
- Configure simulated controllers' starting positions. You can set one or both of your simulated controllers to any position you'd care to. Using default presets, you can put them at the player's (simulated) waist, at desk-level, reaching forward, or in a classic boxer's pose (put up your dukes!).
- Move simulated controllers independently of each other. Using simple scripting (seriously - it's one method call!) you can move each controller to one of the position presets or to any set of coordinates you want.
- Test controller interaction with your scene. You can configure your simulated controllers the same way you would configure your standard controller models. That way, you can attach rigidbodies and colliders to them and test their interactions with the rest of your VR scene.
- Simulate HMD play areas. Whether you're developing for room-scale, seated, or standing VR on the Vive or Oculus Rift, you can simulate play areas of calibrated or custom scale with configurable display options and specialized behavior.
- Capture player input using events. Easily test your existing interaction logic by subscribing to one of the VR Simulator's events - when the player pulls a trigger, have your scene do whatever it would normally do.
- Easy C# scripting. The VR Simulator provides an easy-to-work with C# scripting API that lets you build on, integrate with, or react to anything that happens in the VR Simulator.
What doesn't the VR Simulator do?
|
|
The VR Simulator is meant to make development easier. It is not a production-grade asset, and is not designed to be included in the VR experiences that you release.
Can its input mapping and locomotion support be used in a production build? Sure, theoretically - but there are better ways of handling all of that and that is not what the VR Simulator was built to do. |
The VR Simulator is not designed to provide "true" locomotion support for your VR scenes. It is meant to provide a quick-and-dirty approximation of locomotion support. As a result, it does not do any of the following:
- It has no specialized logic for graceful handling of inclines or stairs.
- It has no support for teleportation-based locomotion.
- It has no support for gaze-based input capture (selection or interaction).
- It hasn't been testing in zero-gravity scenes (though movement is gravity-adjusted in the configuration).
- It hasn't been tested in any mobile VR systems (e.g. Samsung Gear or Google Cardboard).
What HMDs and input devices does it support?
The VR Simulator is designed to work with:
- any SteamVR plugin-compatible HMD (i.e. the HTC Vive), and;
- the Oculus Rift.
|
|
Oculus Rift support has been tested with the Oculus Rift CV1. Presumably, it should work with the DK1 and DK2 insofar as the Oculus Utilities for Unity plugin works with those devices, but we haven't done any testing (because we don't have DK1s or DK2s).
We have not built support for OSVR's plugins into the VR Simulator - if you'd like to see OSVR support, let us know!
If you test the VR Simulator on any of these untested platforms, please drop us a line to let us know how it went! |
The VR Simulator recognizes and supports input from the following devices:
- Keyboard
- Mouse
- Gamepad (XBox One Controller, specifically)
- HTC Wand (Vive Controllers)
- Oculus Remote
- Oculus Touch (theoretically! see note below)
|
|
Oculus Touch support has not been tested yet. That's because while the Oculus Utilities for Unity do provide an API for interacting with the Touch, we don't have any Touch controllers to test with.
If someone does have some Touch controllers and has tested the VRSimulator with them, please drop us a line! |
What are its requirements?
The VR Simulator's requirements are very simple:
Platform: |
- RECOMMENDED: Unity 5.4.1p1 or higher. However, has been tested and seems to work fine on on Unity 5.4.0f3 as well.
- Windows or Mac (not tested on Linux).
|
|
Certain functionality that relies on the Oculus APIs may be limited on MacOS. This particularly relates to the use of calibrated play areas. | |
Project: |
Your Unity project must contain:
|
Scene: |
Your scene must contain one or more of the following:
- The SteamVR: [CameraRig] prefab, and/or;
- The Oculus: OVRCameraRig prefab, and/or;
- The OVRPlayerController prefab (which also contains the OVRCameraRig prefab), and/or;
- A custom .
|
|
If you customize one of the camera rig prefabs (changing its name in particular), the VR Simulator will still work. However, you will have to set the CameraRig property explicitly when configuring the VRSimulator.
|
|
And that's it!
|
|
If your Unity project or scene doesn't meet the requirements above, then the VRSimulator will throw an exception and log an error to the Unity console when you first import the asset, and likely again when you try to Play your VR scene. |
How does it work?
Once you've imported the VR Simulator into your project, just drag the [VRSimulator] prefab into your VR scene - and that's it! You can then edit the VR Simulator's configuration settings by clicking on the [VRSimulator] gameobject in your hierarchy.
For more details on working with the VR Simulator, please take a look at:
See Also
Configuring the VRSimulator