No input from Trackpad Oculus 2

Hello everyone, I am actively working on my project and have encountered an input problem from XRController3D, namely with the touchpad or also called Trackpad. I’m using Oculus 2 and Touch Controllers. In Action Map I set Thumbstick input godot/secondary: Secondaty/joystick/thumbstick/trackpad as Vector2 .

Снимок экрана 2024-07-06 213701

In the script on XRController3D, I subscribe to the event InputVector2Changed += OnVector2Changed ;
In the method I simply output to the console

private void OnFloatChanged(string _nameButton, double _value)
{
GD.Print(_nameButton + _value)
}

But this does not give any results, has anyone encountered this problem? I would be glad for any help since I’m stuck on this.

You are mapping the “Thumbstick” input on the Quest (which is the little joystick thingy) to both primary and secondary actions and would result in both actions having the same state based on the thumbstick input.

However this isn’t allowed in OpenXR and will likely lead to a validation error when the action map is submitted to OpenXR (this will be output in your log if you enable remote debug, else you need to check adb logcat), and probably stops things from working all together.

Note that the Oculus touch controller doesn’t have a trackpad, it only has trigger, Grip, A and B buttons and the thumbstick (including various touch sensors). It does have a thumbrest touch sensor for when your thumb is resting on the side of the controller. You can find more info on the available inputs in the OpenXR documentation here: The OpenXR™ Specification

1 Like

When I was using Unity I was able to get the Vector2 value from the trackpad. It’s strange why this can’t be done in Godot…

Is there a solution to how I can get the value from trackpad. I’m emulating a mouse on a Subviewport and the trackpad value is very necessary since I want to use it to simulate a mouse wheel.

I don’t know how Unity does it, all I know is that there is no mention of a trackpad input on Touch controllers in the OpenXR specification. I also can’t find any vendor extension that adds support for it.

If Unity supports it, they must bypass OpenXR and access it some other way.

1 Like

@rostyslav.keivan so far all feedback I’ve gotten by asking around is that this is not a feature, also not within Unity. Very keen to know if they’ve worked around that restriction somehow and what API in Unity exposes this feature?

Thanks Bastiaan, it looks like I figured it out.

Unity uses their implementation from HTC Vive, and what’s also interesting is that you were right about the Oculus Touch Controller. It does not have a trackpad that reads Vecto2 as I expected for laptops, but only a true/false touch sensor.

In the regular Quest menu, if you want to scroll, you use the thumbstick and not the trackpad. The trackpad there also does not work as a scroll, it is obvious that it serves for the position of the finger. In other platforms, the controllers may not have a thumbstick, but there will definitely be a trackpad which will have a Vector2, this is what confused me. Most likely this is done for backward compatibility if we look at the input profiles, HTC Vive does not have a thumbstick item,

Снимок экрана 2024-07-11 171446

but if we look at the profiles Quest input, there is no trackpad item.

Снимок экрана 2024-07-11 171522

Conclusion - I use thumbstick in my project, now everything works as it should.