dario Posted December 22, 2020 Share Posted December 22, 2020 Vive Cosmos OpenXR Feature package for Unity After installing the Unity OpenXR plugin you can add the HTC Vive Cosmos Controller Support Feature to OpenXR Features as shown: You can download the HTC Vive Cosmos Controller package preview as a tarball file here: UPDATE: v1.0.0 Unity issues from latest plugin resolved. Download: com.htc.upm.vive.openxr.controllers-1.0.0.tgz previous update: Add common usage “gripButton” for grip-pressed input. Add common usage “triggerButton” for trigger-pressed input Use the package manager to install as either a tarball or if you run into any issue you can unzip it and use the from disk option and point to the json file. Unity includes several samples with their OpenXR package so be sure to install the Controller Sample. This sample will display all the controller's inputs visually for almost all the input because the Cosmos controller has an additional "bumper" button next to the trigger button. As shown you can run in editor connecting to the OpenXR PC runtime. In this case it's the "Default" Vive Cosmos OpenXR runtime. To set it as the default you should select it as the default when you first run the runtime from the Vive Console. This will set the default Windows registry values. To install the Vive Cosmos OpenXR runtime please see: https//forum.vive.com/forum/92-vive-openxr/ Now as you may have noticed above I've added an indicator for the Bumper button status (green when pressed) for both left and right hand controllers for this sample. You can add them with the following steps. 1) Once you've enabled the feature (first screen shot above) we can edit the Controller sample to include the additional indicator by duplicating the Trigger Press visual element, renaming it as "Bumper Press" and moving it slightly to the right of Trigger Press (remember to do likewise for RightHand). 2) To edit the Action binding for this new indicator first double click on the Action Reference field of the Action to Button ISX script component in the inspector as shown above. Once you get the following Input Actions window, you can add the new actions and bind them to the appropriate binding path that the Vive Cosmos Controllers feature provided as shown below and while this window is open also add one for the right hand controller. And with that you can start using all the Vive Cosmos controllers inputs for your OpenXR applications! Note: screen shots don't reflect the latest Unity OpenXR plugin version and will be updated 2 Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now