Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hand detection errors in different places #91

Open
Alexees opened this issue Aug 31, 2020 · 4 comments
Open

Hand detection errors in different places #91

Alexees opened this issue Aug 31, 2020 · 4 comments

Comments

@Alexees
Copy link

Alexees commented Aug 31, 2020

When detecting and losing hands, I receive about 3 different errors completely at random.
In the MRKT-Quest_BasicSetup scene I randomly get spammed with this because the Controller is null:

NullReferenceException: Object reference not set to an instance of an object
Microsoft.MixedReality.Toolkit.Input.LinePointer.get_IsInteractionEnabled () (at Assets/MixedRealityToolkit/MRTK/SDK/Features/UX/Scripts/Pointers/LinePointer.cs:56)
Microsoft.MixedReality.Toolkit.Input.MixedRealityInputModule.Process () (at Assets/MixedRealityToolkit/MRTK/Services/InputSystem/MixedRealityInputModule.cs:123)
UnityEngine.EventSystems.EventSystem.Update () (at C:/Program Files/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

Since I am not using the shipped but the official teleport pointer. That one is also causing two errors every now and then:

TeleportCursor.cs: 96
Debug.LogError($"{pointer.GetType().Name} has not been registered! " + pointer.PointerId);

This is because the FocusProvider does not have the requested pointer. And finally:

TeleportPointer.cs: 355
                    if (eventData.SourceId == InputSourceParent.SourceId &&
                    eventData.Handedness == Handedness &&
                    eventData.MixedRealityInputAction == teleportAction)

This is because InputSourceParent is null by the time this is called.

In sum of the errors lead to the pointers still being active for at a least one frame (the first error can get spammed quite a lot) after a source has been lost.
It was beyond me to find out why this is. Most of the missing references happen for objects that shouldn't be in the dictionary they were iterated over because of them being altered in OnSourceDetected and OnSourceLost.

@provencher
Copy link
Owner

I forwarded your feedback to the MRTK folks. As for the teleport issues, the official pointer is not designed for hand tracking and the way to get it working is a hack, so I genuinely advise against using it over the custom one.

Beyond that, the custom teleport pointer has a number of usability improvements, including audio, stabilization and improved responsiveness, in addition to having a cursor that animates and doesn't error.

@Alexees
Copy link
Author

Alexees commented Aug 31, 2020

Is it possible to extend the reach of the custom one. That was the main reason I was not using it

@provencher
Copy link
Owner

Yeah I think all you'd have to do is adjust the ballistic angle. There's a limit to how far it can go from the parabolic math, but I'm sure you could extend the range.

@Alexees
Copy link
Author

Alexees commented Sep 9, 2020

@provencher I could not find the issue for this on one MRKT git issue page, but I created another, maybe related or the same.
microsoft/MixedRealityToolkit-Unity#8429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants