StereoKit / StereoKit

An easy-to-use XR engine for building AR and VR applications with C# and OpenXR!
https://stereokit.net/Pages/Guides/Getting-Started.html
MIT License
971 stars 122 forks source link

Interaction refactor #413

Open maluoi opened 2 years ago

maluoi commented 2 years ago

Describe the feature

StereoKit's UI interactions are currently restricted to 2 hands! This will be shifted over to an arbitrary number of interaction sources, similar to how MRTK works. This will allow for trivially adding support for controllers, mice, far interactions, and other miscellaneous input devices.

maluoi commented 2 years ago

Interaction currently has a fat-finger problem, where if the finger overlaps with multiple UI elements like buttons, the most recently rendered one will get focus. This also happens when padding is small as well. See #425 for additional details.

This can be fixed by accounting for distance to the buttons when checking for focus, and should work pretty well with the current focus priority systems with some adjustments.