Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • LeftButton - state of left handlebar button on bike, or VR hand-controller primary button with sensor
  • RightButton - state of right handlebar button on bike, VR hand-controller secondary button with sensor
  • DpadUp, DpadDown, DpadLeft, DpadRight - thumb buttons on left bike grip, or DS4 controller on PS4
  • RightUp, RightLeft, RightRight, RightDown - thumb buttons on right bike grip, or DS4 controller on PS4
  • InputSpeed - your pedaling speed in meters/sec (approximated at resistance setting 3)
  • HeadRot - yaw angle of your head in radians (positive counterclockwise)
  • HeadLean - amount you are leaning left/right in meters (positive left)
  • HeadBend - amount you are leaning foward/back in meters (positive forward)
  • Distance - virtual kilometers traveled this session (influenced by calibrated resistance)
  • Head - full transform of your head
  • IsSteamVR - using VIVE headset (on PC)
  • HasHmd() - using any VR headset
  • BatteryVolts() - voltage of bike or sensor (starts at 3, replace at 2.1)
  • HeartRate() - user heart rate on bike, or with S3 Watch on GearVR
  • UncalibratedResistance() - proportional to resistance setting on bike, needs app calibration

...

  • Down - true for every frame one's being held down
  • Pressed() - true for the frame a button goes down after being up
  • Released() - true for the frame a button goes up after being down
  • Held(float sec) - true for all the frames after a button has been held down for "sec"
  • Clear() - used to "clear" down button state to make Held() and Released() return false after it's been called

Currently supported gamepads are Xbox, DS4, and Logitech Dual ActionTo get LeftButton and RightButton values with VZ Sensor, you need to use a hand controller that comes with your Rift (Touch), Vive, GearVR, or Daydream. Accessing these with Unity 5.4.2 requires that you separately install the SteamVR plugin, GoogleVR plugin, or OVR plugin for Unity, and enable the code in VZControllerMap.cs that talks to them (with the VZ_GAME build flag for all three, or by editing that file for just the plugins you install).  We'll soon add support for Unity 5.5+ to not require these plugin downloads.

You can test VZController functionality without a VZ bike or sensor when running from the Unity Editor with standard gamepads or keyboard, with the following mappings. Additional devices can be configured in Assets/VZ/Resources/VZControllerMap.xml

...