Just like how a user can move around in a room, simulators can be used to simulate those movements.
It is important to remember that when moving around using either teleportation or continuous locomotion, the entire XR Rig is moved. As the camera and hands are a part of XR Rig they move along as well.
The camera and hands are free to move inside of the rig. However, the movement of these does not move the rig.
This blog post covers all the key bindings associated with XR Simulator. It is divided into five sections:
All in all, setting up and using the XR Simulator is quite easy and fast! You don't necessarily have to read this documentation from start to finish – it's more like a reference on how to use specific aspects of the simulator.
I've added a lot of different ways on how you can use the XR simulator. With that being said, enjoy! 😎
You should know what an XR Rig is, how the XR Rig is set up, and the difference between room-scale and stationary. I am capturing the controls of a room-scale XR Rig here. Unity's documentation will help you get started with the configuration of the XR Rig and Locomotion systems.
Setting up the XR Simulator is really easy. You would have already installed the XR Interaction Toolkit while setting up the XR Rig. However, the XR simulator has to be imported from the samples.
Navigate to the XR Device Simulator folder by going into Assets → Samples → XR Interaction Toolkit → (whichever version you have installed).
Finally, just drag and drop the XR Device Simulator into the Hierarchy.
⚠️ The XR simulator will function only if the XRRig has been correctly set up.
ComponentSelectionDeselectionCameraThe right-click button on the mouse selects the head/camera.Releasing the click button will deselect the cameraLeft handMethod 1 (Toggle): Pressing and holding the right shift key selects the left handMethod 1: Upon releasing the button, the left hand get deselectedLeft handMethod 2 (Press): Pressing the key T once will select the left hand.Method 2: Pressing the key T once again will deselect the left handRight handMethod 1 (Toggle): Pressing and holding the space bar selects the right handMethod 1: Upon releasing the button, the right hand get deselectedRight handMethod 2 (Press): Pressing the key Y once will select the right hand.Method 2: Pressing the key Y once again will deselect the right hand
There are two ways of simulating rotational motion.
Method 1: Pressing down and holding on the scroll wheel will enable rotation mode. It changed back to translation mode when the scroll wheel is released.
Method 2: Pressing the key 'R' will change the mode to rotation. Pressing it once again will bring it back to translation mode.
For the grab, trigger, primary and secondary buttons to work in the simulator either of the hands has to be selected first.
For the grab, trigger, primary and secondary buttons to work in the simulator either of the hands has to be selected first. After selecting either of the hands, camera, or all three components at once. Their position and rotation can be reset to their original position using the reset button.
Camera / Head movement
The camera can be moved by pressing and holding the right-click along with the basic mouse movements.
Hand movement
There are two ways of moving the hands, the basic mouse movements remain the same only the method of selection changes.
Left-hand movement: Method 1
Left-hand movement: Method 2
Right-hand movement: Method 1
Right-hand movement: Method 2
Movement of both hands together: Method 1
Movement of both hands together: Method 2
The camera can be rotated by pressing and holding the right-click along with the basic rotational movements.
Camera / head rotation: Method 1
Camera/ head rotation: Method 2
Hand movement
There are two possible ways of rotating the hands. The hand selection and basic mouse movement remain the same, the way of selecting rotation mode changes.
Left-hand rotation: Method 1
Left-hand rotation: Method 2
Right-hand rotation: Method 1
Right-hand rotation: Method 2
Rotation of both hands together: Method 1
Rotation of both hands together: Method 2
⚠️ Note: Depending on the locomotion system that is selected, the same keys have different functionalities. The function of the key will also vary depending on which hand is selected and the configuration of that hand.
⚠️ Note: The rig will only teleport if the teleportation area / anchor exists. Also, the function of the key will vary depending on which hand is selected and the configuration of that hand.
⚠️ Note: After grabbing the object, it will follow the hands' movement. If the hand is rotated, the object will rotate as well.
There are two ways or resetting the rotation. It is similar to the ways of choosing.
Rotation reset: Method 1
Rotation reset: Method 2
XR Simulator is a useful tool for all XR developers out there. Here are some of the advantages of the XR Simulator as opposed to testing it in actual hardware:
Most of my development is done using the simulator, it is only at the final stages that I use the headset to test and feel the UI/UX. I personally feel not having a VR headset should not stop you from developing apps / VR experiences.
If you've enjoyed the insights shared here, why not spread the word? Share the post with your friends and colleagues who might also find it valuable.
Your support means the world to us and helps us create more content you'll love.