-
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 VIU Settings)
- 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 forward
- [G] Move backward
- [H] Move right
- [F] Move left
- [Y] Move up
- [R] Move down
- [N] Roll+
- [V] Roll-
- [B] Reset roll
- [I] Pitch+
- [K] Pitch-
- [L] Yaw+
- [J] Yaw-
- 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