Playing a Hololens Gesture lesson using HoloToolkit

Not sure if this works best for here or for Unity or MS forums, but we'll try StackOverflow.

I tried to reproduce Hololens tutorial 211 using HoloToolkit . I'm just trying to do section 1 and reproduce hand recognition.

In this situation, I have used all the files that are in the HoloToolkit that share the name with the text in the tutorial, except for Singleton, which seems to work differently in two cases. For any files in the tutorial that weren't in the Toolkit, I copied them over.

As long as the HandsManager starts up and calls private void InteractionManager_SourceDetected(InteractionSourceState hand)

and sets handDetected to true, and handDetectedGameObject is active, nothing changes in the cursor. I'm not sure what information would be helpful to reproduce this above what I wrote (I don't think it makes sense to drop so many files here on SO), but does anyone know why this might be? I am using the same CursorFeedback script, and I have nested the finished HandDetectedFeedback collection as a HandDetected Asset object, using the home collection with the Billboard.cs component as the feedback parent.

If any information here is helpful, let me know and I can provide it.

+3


source to share


1 answer


I haven't watched the tutorials for a long time, but last time I was terribly out of date. Getting input from Toolkit has changed a lot since they were written.

You need to add the InputManager component to your scene from the toolbox. Then create a script and add it to your scene that implements the ISourceState interface and implements "OnSourceDetected" and "OnSourceLost" that are triggered when a hand is found and when it is lost.

For more information, you can refer to the documentation from HoloToolkit:



https://github.com/Microsoft/HoloToolkit-Unity/blob/master/Assets/HoloToolkit/Input/README.md

or check out the more complete guide that has been updated on my website. This part of the tutorial specifically implements hand and click recognition:

http://www.cameronvetter.com/2017/01/03/hololens-tutorial-finalize-spatial-understanding/

+2


source







All Articles