MixedRealityToolkit-Unity
MixedRealityToolkit-Unity copied to clipboard
NearInteractionTouchable cannot be pressed from the side
Describe the bug
Near interaction touchables can only be configured to be touched within a quad region, from one direction.
To reproduce
- Create a box collider with cube on it.
- Add near interaction touchable, set local forward to -1
- Try to touch the cube from the side
Expected behavior
- As I approach the cube from side, finger cursor shows up correctly angled toward the cube
- When I touch, I get a touch event
Actual behavior
When I approach, I do not see finger cursor until I'm touching the object. Some people have reported not getting any events at all.
Your Setup (please complete the following information)
- Unity Version 2018.3.9f1
- MRTK Version RC1 Refresh 1
Target Platform (please complete the following information)
- Editor
Additional context
I believe one approach to fixing this would be to modify NearInteractionTouchable to support different touchable types. Currently, we just suport a 'quad', we coudl also support 'box volume', and 'plane'. The DistanceToSurface calculation would differ based on the touch type.