Releases: ViveSoftware/ViveInputUtility-Unity
Vive Input Utility v1.7.2
Changes for v1.7.2:
-
New features
- Add recommended VR project settings notification window
-
Bug fix
- Fix compile error in Unity 5.5/5.6
- [VRModule] Fix UnityEngineVRModule not removing disappeared device correctly
- In Unity 2017.2, InputTracking.GetNodeStates sometimes returns ghost nodes at the beginning of play mode.
- [Teleportable] Remove a potential null reference
- This happens when SteamVR plugin is imported and no SteamVR_Camera exist.
-
Improvement
- [Pointer3D] Now Pointer3DInputModule shows status in EventSystem's inspector preview window
- [Pointer3D] Let Pointer3DInputModule behave more consistent with StandaloneInputModule
- Now IPointerEnterHandler / IPointerExitHandler only triggered once for each pointer, pressing buttons won't trigger Enter/Exit anymore.
- [Pointer3D] Add IPointer3DPressEnterHandler / IPointer3DPressExitHandler
- Their behaviours are like IPointerEnterHandler/IPointerExitHandler, but press enter happend when the button is pressed and moved in, and press exit on button released or pointer moved out.
- [SteamVRCameraHook] Fix not expending head-eye-ear correctly
- [VRModule] Fix update timing issue
- This fix VivePoseTracker tracking is delayed in editor playing mode.
Vive Input Utility v1.7.1
Changes for v1.7.1:
- New features
- [ExternalCameraHook] Add externalcamera.cfg config interface
- The interface is built into project when VIU_EXTERNAL_CAMERA_SWITCH symbol is defined.
- It is automatically activated with the external camera quad view.
- [ExternalCameraHook] Add externalcamera.cfg config interface
-
Changes
- Now you can fully disable the binding interface switch by removing the VIU_BINDING_INTERFACE_SWITCH symbol
- That means nologer
- Now you can fully disable the binding interface switch by removing the VIU_BINDING_INTERFACE_SWITCH symbol
-
Bug fix
- [ViveRole] Fix HandRole.ExternalCamera not mapping to tracker in some cases
- [ViveRole] Fix ViveRole.IMap.UnbindAll() to work correctly
- [BindingInterface] Fix some info updating and animation issue
- [VivePose] Now GetPose returns Pose.identity instead of default(Pose) for invalid device
Patch for v1.7.1 (2017-10-23 updated)
-
Bug fix
- Fix compiler error on Unity 5.5/5.6
- Fix Pointer3DInputModule(ViveRaycaster) event emitting behavior inconsistent with StandaloneInputModule
-
Improvement
- Add 2 event emitted by Pointer3DInputModule
- Pointer3D.IPointer3DPressEnterHandler
- It's like IPointerEnterHandler, instead it happens when both pointer moved in and the related button is pressed.
- Pointer3D.IPointer3DPressExitHandler
- It's like IPointerExitHandler, instead it happens when pointer moved out or the related button is released.
- Pointer3D.IPointer3DPressEnterHandler
- Add 2 event emitted by Pointer3DInputModule
Vive Input Utility v1.7.0
Changes for v1.7.0:
-
New features
- Add notification when new version released on Github.
- Add VRModule class to bridge various VR SDK. It currently supports SteamVR plugin, Oculus VR plugin and Unity native VR/XR interface.
- void VRModule.Initialize(): Create and initilize VRModule manager instance.
- VRModuleActiveEnum VRModule.activeModule: Returns the activated module.
- IVRModuleDeviceState VRModule.GetCurrentDeviceState(uint deviceIndex): Returns the virtual VR device status.
- event NewPosesListener VRModule.onNewPoses: Invoked after virtual VR device status is updated.
- event DeviceConnectedListener VRModule.onDeviceConnected: Invoked after virtual VR device is connected/disconnected.
- event ActiveModuleChangedListener VRModule.onActiveModuleChanged: Invoked when a VR module is activated.
- New binding interface using overlay UI. By default, the binding interface can be enabled by pressing RightShift + B in play mode.
- Add define symbols
- VIU_PLUGIN: Defined when Vive Input Utility plugin is imported in the project.
- VIU_STEAMVR: Defined when SteamVR plugin is imported in the project.
- VIU_OCULUSVR: Defined when OculusVR plugin (OVRPlugin) is imported in the project.
- VIU_BINDING_INTERFACE_SWITCH: Define it to let the project be able to switch binding interface by pressing RightShift + B in play mode.
- VIU_EXTERNAL_CAMERA_SWITCH: Define it to let the project be able to switch external camera quad view by pressing RightShift + M in play mode.
- Add new role HandRole.ExternalCamera (Alias for HandRole.Controller3).
- By default, it is mapping to the 3rd controller, if 3rd controller not available, then mapping to the first valid generic tracker.
- ExternalCameraHook uses mapping as the default tracking target.
-
New componts
- [ViveInputVirtualButton] Use this helper component to combine multiple Vive inputs into one virtual button.
-
Improvement
- [ViveInput] Add more controller buttons, use ViveInput.GetPress(role, buttonEnum) to get device button stat
- System (Only visible when sendSystemButtonToAllApps option is on)
- Menu
- MenuTouch
- Trigger
- TriggerTouch
- Pad
- PadTouch
- Grip
- GripTouch
- CapSenseGrip
- CapSenseGripTouch
- AKey
- AKeyTouch
- OuterFaceButton (Alias for Menu)
- OuterFaceButtonTouch (Alias for MenuTouch)
- InnerFaceButton (Alias for Grip)
- InnerFaceButtonTouch (Alias for GripTouch)
- [ViveInput] Add controller axis enum, use ViveInput.GetAxis(role, axisEnum) to get device axis value
- PadX
- PadY
- Trigger
- CapSenseGrip
- IndexCurl
- MiddleCurl
- RingCurl
- PinkyCurl
- [ViveRole] Role mapping/binding mechanism is improved and become more flexible.
- Now different devices can bind to same role at the same time.
- If a unconnected device is bound to a role, that role can still map to other connected device.
- [ViveRole] Obsolete functions that retrieve device status and property, use static API in VRModule instead.
- ViveRole.TryGetDeviceIndexBySerialNumber: Use VRModule.TryGetDeviceIndex instead.
- ViveRole.GetModelNumber: Use VRModule.GetCurrentDeviceState(deviceIndex).modelNumber instead
- ViveRole.GetSerialNumber: Use VRModule.GetCurrentDeviceState(deviceIndex).serialNumber instead
- ViveRole.GetDeviceClass: Use VRModule.GetCurrentDeviceState(deviceIndex).deviceClass instead
- [ViveRoleBindingsHelper] Now will automatically load bindings from "vive_role_bindings.cfg", no need to be in the scene to work.
- [RenderModelHook] Add override model and shader option.
- [ExternalCameraHook] Now ExternalCameraHook will track the HandRole.ExternalCamera by default.
- [ExternalCameraHook] Now will be added into scene automatically if "externalcamera.cfg" exist when start playing, no need to add to scene manually.
- [ExternalCameraHook] You can now enable static External Camera quad view (without tracking to a device) if
- VIU_EXTERNAL_CAMERA_SWITCH symbol is defined.
- externalcamera.cfg exist.
- RightShift + M pressed in play mode.
- [BasicGrabbable, StickyGrabbable, Draggable] Add unblockable grab/drag option.
- [ViveInput] Add more controller buttons, use ViveInput.GetPress(role, buttonEnum) to get device button stat
-
Bug fix
- [ViveRoleProperty] Fix not handling serialized data right in inspector.
- [PoseEaser] Now use unscaled time instead to avoid from being effected by time scale.
Vive Input Utility v1.6.4
Changes for v1.6.4:
-
Resloves tracking pose not updating in Unity 5.6 issue#12
-
Add SnapOnEnable option to ViveRigidPoseTracker component
-
Add mouse button mapping options to ViveRaycaster component
-
Fix crashes when clicking dropdown UI in RoleBindingExample scene
-
Fix auto-bake-lightmap errors in example scenes
-
Correct rigidbody null check in Draggable and Grabbable scripts
Vive Input Utility v1.6.3
Vive Input Utility v1.6.2
Vive Input Utiltiy v1.6.0
Changes for v1.6.0:
-
New ViveRole System
- ViveRole is a mapping system that relate logic roles to OpenVR device indices.
- Each role has their own auto-mapping logic, and binding API allow user to customize the relation.
- Both mapping (role, device index) binding (role, device serial number) are one-on-one relation
- When a device serial number is binding to a role, it means that role is always mapping to the specific device
- If the bound device is disconnected, the bound role will not mapping to any device index (invalid).
- Currently there are 4 built-in roles:
- DeviceRole: role that mapping to all 16 devices, ordered exactly same as device index.
- HandRole: role related to standard Vive controllers, with basic RightHand/LeftHand recognition.
- TrackerRole: role related to Vive trackers, first conntected tracker will be mapping to Tracker1.
- BodyRole: role related to devices that tracking human limbs.
- Creating custom role in an instant by adding ViveRoleEnumAttribute to your enum type
- Customizing auto-mapping logic by implementing ViveRoleHandler<EnumType> and call ViveRole.AssignMapHandler()
-
New query APIs that accept any ViveRoles, ex.
- Use ViveRole.GetDeviceIndexEx(TrackerRole.Tracker1) to get tracker's device index.
- Use VivePose.GetPoseEx(TrackerRole.Tracker1) to get tracker's tracking data
- Use ViveInput.GetPressEx(TrackerRole.Tracker1, ControllerButton.Trigger) to get tracker's trigger event.
- Use ViveInput.AddListenerEx(TrackerRole.Tracker1, ControllerButton.Trigger, ButtonEventType.Press) to listen tracker's trigger event.
-
New sample scene "RoleBindingExample"
- This sample scene demonstrate how to bind device a role and save/load those bindings
-
New ViveRoleBindingsHelper helper component
- Adding this component to scene to auto-load bindings.
- Call function SaveRoleBindings(filePath) to save bindings manually.
- Call function LoadRoleBindings(filePath) to load bindings manually.
-
New RenderModelHook helper component
- This script creates and handles SteamVR_RenderModel, so you can show render model specified by ViveRole insdead of device index.
-
New ExternalCameraHook helper component
- This script creates and handles SteamVR_ExternalCamera, and let camera tracking device specified by ViveRole insdead of device index.
- Setup step-by-step
- Add a file called externalcamera.cfg in the root of your project. (the config file sample can be found here)
- Add ExternalCameraHook component into your scene. (don't remove the auto-generated SteamVR_Render component)
- Select ExternalCameraHook gameobject and set the device role in inspector. (or set in script, ex. ExternalCameraHook.viveRole.SetEx(TrackerRole.Tracker1))
If you are using 3rd Vive standard controller as external camera, set to HandRole.Controller3 (recommended)
If you are using ViveTracker as external camera, set to TrackerRole.Tracker1 (recommended) - (Optional) Bind the external camera tracking device to the role
- Open "RoleBindingExample" scene
- Scan the specific device (for external camera)
- Bind to the specific role (ex. HandRole.Controller3 or TrackerRole.Tracker1)
- Save bindings
- Back to your project scene
- Add ViveRoleBindingsHelper component into your scene. (to load bindings automatically)
- Now external camera should always tracking at the device you wanted.