Open MathiasBaumgartinger opened 4 years ago
0f9db6631e68dd72d99dc9d0a1cb95e546b56e76 does this, i have found a little workaround that only one controller can be active per viewport. Seems a little hacky with a global-access dictonary (singleton) on the controllers and the ui itself setting one active controller at a time via the _gui_input(event):
-function and event.device
. I will rewrite this at another time maybe.
Might reconsider refactoring this and see if there is a more elegant way to this, i cannot seem to find one right now however.
Also there seems to be a bug when hovering with 2 interactions as this will result in one controller permanently vibrating.
The ARVRControllers of https://github.com/GodotVR/godot_openvr have a property rumble which can be set in order to make the controller vibrate. As our controller-UI-input is only a faked mouse-input it is not quite that simple finding out the id of the controller that currently hovered the new UI element. Sadly the
mouse_entered
function does not provide theevent.device
property.