I’m using Unity 2020.3, OpenXR 1.2.2, and XR Interaction Toolkit 1.0.pre3 in my project and now someone tired it with an G2 Controller but was unable to select any Grab Interactiable Object. I also use the device based XR Rig since when I started the action based Input wasn’t available.
What wonders me is, that with the Reverb G2 Controller InputDevices.GetDeviceAtXRNode(inputSource).name returns “Oculus Touch Controller OpenXR”. The WMR Controller Profile has been added to the OpenXR Options.
device.TryGetFeatureValue(CommonUsages.grip, out float grip) returns the correct value as well as device.TryGetFeatureValue(CommonUsages.gripButton.
Yet I cannot use the select function on any xr grab interactible. This is when I run the Project with the Mixed Reality Runtime. When I run it though SteamVR, the Controllers don’t work at all.
Oculus Touch and and Index Knuckles work just fine with my project.
There is a G2 controller profile in the mixed reality openxr package that you can get here.
When you choose controller profiles it is just a suggestion to the runtime, if the runtime doesnt find a direct match they will pick the one they feel is the closest match. In this case you likely have Oculus Controller Profile enabled and since there is no G2 Profile enabled (assuming you dont have the their package installed) it is choosing the closest profile and remapping things. This is how forward compatibility for future devices works.
That being said, the question is what grab is bound to, and why that isnt working
It’s bound to the grip button. It works fine with Index and Oculus Touch Controllers and as shown in my post, the grip values can be read from the G2 Controller, which is what wonders me. However, I’ll try to integrate the MRTK profiles.
Not sure why the grab isnt working in the values are coming through, but lets try the G2 controller profile first and if that doesnt work the next step will be to submit a bug through (Help → Report a Bug) so we can look at the project (or a test project that demonstrates the issue). If you do submit a bug please post the issue number here so we can look at it quicker.
I followed your suggestions for my project and it still did not work when added the G2 Controller Profile (shouldn’t that be included in the OpenXR Package instead of being hidden in MRTK?). Device.name now shows the G2 Controller OpenXR als input name. Though, I can still read the grip button/trigger input from the G2 Controller. It just does not work with an XR Grab Interactible.
However, I started to create a demo app to showcase my issue, but I’m unable to recreate it. It was 1:1 the same settings, same plugins/versions of the xr packages and it just worked as intended. But not in my main project.
Do you have any thoughts what I might have missed that could cause this weird behavior.
The G2 Controller is still an OpenXR Extension so it is supported externally by Microsoft. Eventually it will likely make its way into the Unity base package.
Could you send a screenshot of the grab interactable component settings? Also I am actually not very familiar with XRI myself so I will share this thread with someone who can hopefully answer better.
There really isn’t much to show. It’s the basic XR Grab Interactible that doesn’t work with G2. Not much changed, not even a script in the Interactible Events attached to it. Works fine with every Controller, even Vive Sticks, except G2.
I just updated the Input System to 1.1.0Pre5 to see if that would make a difference but no it does not. I’ve been comparing my test project I built yesterday to this one over and over again but I cannot see any difference.
I’d love to shoot you the project but we’re talking 30GB here.
It’s solved. The issue was me.
In my initialization script, I was checking the runtime because steamvr currently has weird controller offsets for oculus controllers.
However, whenever the g2 controller came into play the runtime from wmr was used and not steamvr or the oculus. My init script simply didn’t check that for wmr and applied the Trigger Collider for the Direct Interactor properly. Well, not at all actually. With no Tigger Collider enabled on the Direct Interactor, no Grab Interactible. Never thought about the WMR Runtime. Though, G2 Controllers weren’t tracked in SteamVR mode, but that would be offtopic not isn’t relevant at this point anymore.