microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.01k stars 2.12k forks source link

Readme.md need to be updated #431

Closed thecuvii closed 7 years ago

thecuvii commented 7 years ago

some scripts or prefabs have already changed in HoloToolkit, but readme.md is still old. such as GestureManipulator.cs and Main Camera.prefab etc..

StephenHodgson commented 7 years ago

This is a partial duplicate of https://github.com/Microsoft/HoloToolkit-Unity/issues/380 and PR https://github.com/Microsoft/HoloToolkit-Unity/pull/376 has been submitted already.

Would you like me to address the GestureManipulator update, or would you be kind enough to submit a PR on my fork to so that it'll be included in PR 376?

StephenHodgson commented 7 years ago

@Xwil was there anything else I missed that needs to be updated?

thecuvii commented 7 years ago

@HodgsonSDAS thanks

thecuvii commented 7 years ago

@HodgsonSDAS I can't find GestureManipulator.cs in HoloToolKit, all I can find about Gesture is (InputManager/GestureInput) GestureInput.cs and GestureResponder. and I added GestureResponder to my gameobject, I want to scale my gameobject by Gesture.What should I do? I also add Hand Draggable.cs to my gameobject, it works fine. Sorry to bother you , I'm new to Hololens , and I'm confused about HoloToolKit.Thanks a lot.

aalmada commented 7 years ago

@Xwil To handle gestures you need to have one InputManager (singleton) and at least one GestureInput in your scene. To handle the events, the MonoBehaviours that handle them has to implement any of the following (one or more), depending on what you are interested: IInputClickHandler, IHoldHandler, IManipulationHandler, INavigationHandler. The InputManager calls the handler that is at the GameObject with the gaze focus. If there is none, it goes up the scene hierarchy until it finds one. If none is found, it calls the registered fallback. If you want the handler to be always called, add SetGlobalListener.cs to the GameObject.

thecuvii commented 7 years ago

@aalmada Thank you so much,I'll try it.

comarabi commented 7 years ago

@aalmada I can`t implement the handler on the Gameobject. I get the the error "cant add the script behaviour.... the script class cant be abstract!" what the issue? Thanks for helping, sorry I m new in developing....