HandDraggable example broken in 2017.2
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); }
I know I tested and fixed this for the latest release.
Which version of unity and the SDK are you using?
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?
Use unity 2017.1.2 with the latest release
See #1184
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.
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
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?
No, I can confirm I fixed this PR #1177
Seems like 1177 fixed it only for 2017.1 but not for 2017.2
Thanks for looking in to it @stephenHodgson.
Thanks @ThoWelt ! I could not realize why the handdraggable script did not work and I was going crazy