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

HandDraggable example broken in 2017.2

Open aaronvark opened this issue 9 years ago • 11 comments

The "GetSupportedInputInfo" function incorrectly appears to return false when checking support for Positional information after receiving OnInputDown events in the HandDraggable.cs script, effectively breaking the ability to move objects on HoloLens using finger input.

I've confirmed position does exist, by checking the Position data contains a valid non-zero location:

FocusDetails? det = FocusManager.Instance.TryGetFocusDetails(eventData); if (det != null) { Debug.Log(det.Value.Position); }

aaronvark avatar Oct 19 '17 15:10 aaronvark

I know I tested and fixed this for the latest release.

Which version of unity and the SDK are you using?

StephenHodgson avatar Oct 19 '17 15:10 StephenHodgson

I was using the 2017.2 tag, and am using Unity 2017.2.0f3, and SDK 10.0.16299.0. Can I simply update to the latest dev to fix this?

aaronvark avatar Oct 19 '17 15:10 aaronvark

Use unity 2017.1.2 with the latest release

StephenHodgson avatar Oct 19 '17 15:10 StephenHodgson

See #1184

StephenHodgson avatar Oct 19 '17 15:10 StephenHodgson

For using 2017.2 editor and tookit on my hololens, I had to comment out the check for position data in handdraggable, and change the references from TryGetPointerPosition (which uses the gaze pointer) to TryGetGripPosition (which gives you your hand position). Works for me now.

hannesne avatar Oct 31 '17 21:10 hannesne

Hi Hannesne, could you please post your draggable changes? I don't get it, how to "comment out the check for position data in handdraggable". There are to many position checks in this class. Very thanks for your time and your idea!!

Edit: everything else is working fine with 2017.2.0f3 at 2017.1.2f1 i get big laggs and nonstop "RenderTexture.GenerateMips failed"

Edit2: Got it. Super thanks to you!! Unity 2017.2.0f3, W-SDK 10.0.16299.0, newest MRTK

comment out:

if (!eventData.InputSource.SupportsInputInfo(eventData.SourceId, SupportedInputInfo.Position))
{
  // The input source must provide positional data for this script to be usable
  return;
 }

and change 2 times: TryGetPointerPosition to TryGetGripPosition

ThoWelt avatar Nov 10 '17 13:11 ThoWelt

Hi ThoWelt,

I was having the exact same problem with HandDraggable, your solution works, I think this should be added to the main branch. Now it works for me using Unity 2017.2.0f3, W-SDK 10.0.16299.0, newest MRTK 4

@StephenHodgson are you having this issue on your end as well?

asanint avatar Nov 12 '17 13:11 asanint

No, I can confirm I fixed this PR #1177

StephenHodgson avatar Nov 12 '17 15:11 StephenHodgson

Seems like 1177 fixed it only for 2017.1 but not for 2017.2

StephenHodgson avatar Nov 14 '17 01:11 StephenHodgson

Thanks for looking in to it @stephenHodgson.

asanint avatar Nov 14 '17 02:11 asanint

Thanks @ThoWelt ! I could not realize why the handdraggable script did not work and I was going crazy

fabioshepherd avatar Nov 14 '17 14:11 fabioshepherd