Closed Nuno-Monteiro closed 9 months ago
Hi @Nuno-Monteiro . Could you please provide more details on the prefabs being used for the hierarchy of your setup. (Some images might help too)
Hi @vaoliva . Sorry for the late reply, I was trying to get the cleanest environment possible so there's no confusion between us going forward with this issue.
I must say I'm a bit confused now as it isn't happening quite as I described but here goes:
Setup 1: MRTK Sample Scene ScrollingObjectCollection clean
Used hierarchy:
Expected behavior: Ability to scroll and interact with buttons using near interaction (non hand rays based interaction).
Result: Everything works as expected. I can scroll and press each button.
Setup 2: MRTK Sample Scene ScrollingObjectCollection scrolling a list of complex objects.
Used hierarchy: The complex hierarchy is: empty game object as parent with the following children: -label -quad -checkbox (MRTK prefab with the label turned off and the box collider adjusted to fit just the square)
This is how the parent looks like in the inspector:
Expected behavior: Ability to scroll and interact with buttons using near interaction (non hand rays based interaction). More specifically, the ability to scroll by pressing anywhere on the list and ability to enable the check by pressing on it, and nowhere else on the button.
Result: Running the scene on editor with MRTK simulation sometimes I can scroll the list but the behavior seems non consistent. I can interact with the checkbox. Using remoting and testing with the hololens I can only scroll this list using far interaction techniques. I can always interact with the checkbox as expected.
What am I doing wrong? Is this supported interaction? Is the explanation clearer now?
Thanks for the attention and please let me know how I can help!
This looks similar to #5975. @elbuhofantasma will verify if it has been fixed.
Looks like this was fixed in a feature branch that hasn't made its way to main yet.
As we move onto XRI, we're moving the handling of input events onto Unity's side of things. The feature branch will still be available here, and we'd love it if community members took and interest in refreshing this PR for the v2 input system.
https://github.com/microsoft/MixedRealityToolkit-Unity/tree/feature/event_propagation
I am having the same issue. Have somenone solved in some way? Thanks in advance.
We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!
Describe the bug
Hi guys! I have a vertical scrolling collection with items that have a complex hierarchy of content which includes some labels and a checkbox docked on the right. I want the checkbox to be enabled only by tapping in it and not anywhere else on the item. I've set up the item as stated on the documentation (adding a BoxCollider and NearInteractionTouchable). However, I'm not being able to get events on the checkbox using this hirarchy. This list scrolls but the buttons never get pressed.
To reproduce
Steps to reproduce the behavior:
Use the following hierarchy: ScrollingObjectCollection Container Item label label Checkbox
Checkbox won't get input. The list will scroll.
If I use this hierarchy it works: ScrollingObjectCollection Container Checkbox label label
But this makes the entire item clickable and not just the checkbox.
I also tried this 2nd approach with a variation: making the box collider just around the checkbox instead of the whole item. This works button wise. But it limits the interaction with the scroll to that same area, which is unfortunate.
Expected behavior
I would expect the checkbox to get the events using the first hierarchy mentioned. The scroll shouldn't consume a click and should relay it to inner hierarchy children.
Your setup (please complete the following information)
Target platform (please complete the following information)
Please let me know if it is clear and how can I help you help me! Keep rocking!