-
Notifications
You must be signed in to change notification settings - Fork 80
Simulator
ChengNan Yang edited this page Mar 22, 2018
·
12 revisions
-
Simulator is a fake VRModule that spawn/remove fake devices, create fake tracking and fake input events.
-
Requires checking the Simulator support toggle in Edit > Preferences... > VIUSettings.
-
Simulator can only be enabled when no VR device detected.
-
There are 2 ways to manipulate the fake devices
- Handle events by script manually
- HTC.UnityPlugin.VRModuleManagement.VRModule.Simulator.onUpdateDeviceState
- Invoked each frame when VRModule performs a device state update
- Write device state into currState argument to manipulate devices
- Read-only argument prefState preserved device state in last frame
- HTC.UnityPlugin.VRModuleManagement.VRModule.Simulator.onUpdateDeviceState
- Use Keyboard-Mouse control (can be disabled in VIUSettings)
- Add/Remove/Select devices
- [0~9] Add and select device N if device N is not selected, otherwise, deselect it
- [` + 0~5] Add and select device 10+N if device 10+N is not selected, otherwise, deselect it
- [Shift + 0~9] Remove and deselect device N
- [Shift + ` + 0~5] Remove and deselect device 10+N
- Control selected device
- [W] Move selected device forward
- [S] Move selected device backward
- [D] Move selected device right
- [A] Move selected device left
- [E] Move selected device up
- [Q] Move selected device down
- [C] Roll+ selected device
- [Z] Roll- selected device
- [X ] Reset selected device roll
- [ArrowUp] Pitch+ selected device
- [ArrowDown] Pitch- selected device
- [ArrowRight] Yaw+ selected device
- [ArrowLeft] Yaw- selected device
- [MouseMove] Pitch/Yaw selected device
- [MouseLeft] Press Trigger on selected device
- [MouseRight] Press Trackpad on selected device
- [MouseMiddle] Press Grip on selected device
- [Hold Shift + MouseMove] Touch Trackpad on selected device
- Control HMD
- [T] Move hmd forward
- [G] Move hmd backward
- [H] Move hmd right
- [F] Move hmd left
- [Y] Move hmd up
- [R] Move hmd down
- [N] Roll+ hmd
- [V] Roll- hmd
- [B] Reset hmd roll
- [I] Pitch+ hmd
- [K] Pitch- hmd
- [L] Yaw+ hmd
- [J] Yaw- hmd
- Add/Remove/Select devices
- Note: When the simulator is enabled, it is always started with 3 fake devices
- [0] HMD (selected)
- [1] Right Controller
- [2] Left Controller