MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Fingertip object effects (light, bounding box) not appearing anymore

Open edgar-rodrigo-santos opened this issue 3 years ago • 9 comments

Describe the bug

Regression: Objects with materials that use "Near Fade" and "Use Light" options not behaving correctly. This worked fine on Unity2019.4LTS + MRTK 2.4.0. It is NOT working on Unity2021.3LTS + MRTK 2.8.2.

To reproduce

  1. Open the HandInteractionExamples scene
  2. Move hand closer to the Coffee cup with a Bounding Box.

Expected behavior

Bounding box and light slowly appearing like this: 2022-12-20 13_01_26-Window

Current behavior

Nothing happens (unless the finger is colliding with the bounding box): 2022-12-20 13_13_13-Window

Your setup

  • Unity Version [e.g. 2021.3.11f1]
  • MRTK Version [e.g. v2.8.2]

Target platform

  • HoloLens 2

edgar-rodrigo-santos avatar Dec 20 '22 13:12 edgar-rodrigo-santos

Forgot to add that it looks somewhat similar to this old ticket: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/5962

edgar-rodrigo-santos avatar Dec 20 '22 13:12 edgar-rodrigo-santos

@edgar-rodrigo-santos , are you using URP or SRP? Tagging @Cameron-Micka, even though this isn't technically MRGT.

Zee2 avatar Dec 20 '22 22:12 Zee2

@edgar-rodrigo-santos , are you using URP or SRP? Tagging @Cameron-Micka, even though this isn't technically MRGT.

We're using the "standard" render pipeline, we didn't touch URP or anything else related to the scriptable render pipeline system.

edgar-rodrigo-santos avatar Dec 21 '22 09:12 edgar-rodrigo-santos

Nothing happens (unless the finger is colliding with the bounding box)

This is a good clue! I would look at the location of the ProximityLight component. It should be located near the finger tip. The ProximityLight is what "illuminates" the bounding box. If it's floating off in space (near the cursor?) that might explain this.

Cameron-Micka avatar Jan 03 '23 19:01 Cameron-Micka

I investigated a bit more.

@Cameron-Micka The ProximityLight is in the correct place but it is "disabled": image

If I manually enable it in the editor, it shows what would be expected: image

I debugged FingerCursor.cs and found out that the cause for this element to be de-activated is IsNearGrabbableObject() returning false (which ends up setting "showVisual" to false, which ends up calling UpdateVisuals with false).

I'm also noticing that the "ray" for the "far interaction" immediately appears as soon as we stop colliding with the bounding box (which was not the case before: the hand had to get pretty far away for the "far interaction ray" to appear).

Unfortunately I don't really have more time to troubleshoot where and how exactly this regression happened. Would you be able to fix this or provide a work-around, please?

Thank you

edgar-rodrigo-santos avatar Jan 04 '23 11:01 edgar-rodrigo-santos

Thank you for investigating @edgar-rodrigo-santos!

@Zee2 it's been awhile since I worked with the input system, does this ring any bells?

I debugged FingerCursor.cs and found out that the cause for this element to be de-activated is IsNearGrabbableObject() returning false (which ends up setting "showVisual" to false, which ends up calling UpdateVisuals with false).

I'm also noticing that the "ray" for the "far interaction" immediately appears as soon as we stop colliding with the bounding box (which was not the case before: the hand had to get pretty far away for the "far interaction ray" to appear).

Cameron-Micka avatar Jan 04 '23 18:01 Cameron-Micka

We have a bit more context on why this issue is occuring. The light still works, it's the system that drives when the cursor appears has changed though. It's on our radar to ensure that this is addressed in future MRTK versions.

RogPodge avatar Jan 11 '23 19:01 RogPodge

@RogPodge based on my own investigation, that sounds right.

Do you think this fix will take a long time? In the meantime we are running apps on clients with this regression (it was no longer an option to stay in previous versions of mrtk2) and this affects user experience quite a bit (e.g. this also happens in buttons in our UIs which is a big deal as this feedback is quite important for buttons).

Thank you

edgar-rodrigo-santos avatar Jan 12 '23 09:01 edgar-rodrigo-santos

@RogPodge thanks for confirming this . this is also tracked MS internally / support so let me know if you need more private info from @edgar-rodrigo-santos or myself.

cheles avatar Jan 12 '23 09:01 cheles

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 visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!

IssueSyncBot avatar Jan 13 '24 00:01 IssueSyncBot