The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
how do i start an animation when i tap in unity?
Best Answer
-
OptionsMonday admin
@Shukenmg,
As @timg already mentioned the Holograms-211 course covers this with some nice code examples and it is using the Holotoolkit-Unity Scripts to do most the heavy lifting. A more striped down alternative than the 200 classes may be checking out the 100 class, Origami: https://developer.windows.com/en-us/windows/holographic/holograms_101#Chapter_3_-_Gestures
This has a section (chapter 3) to use the tap gesture on an object that is much more stripped down and easier to understand. How tap works and sending messages to an object that has been tapped. From there instead of creating rigid components you can use Unity's animation Play function on your properly setup animator component: http://docs.unity3d.com/ScriptReference/Animator.Play.htmlCheers,
Ryan11
Answers
Take a look at the Model Expansion chapter in the Holograms-211 course.
If you want to perform your animation in response to the select/tap gesture, put content similar to that in ExpandModelCommand() in your own event handler.
then how to i do it with holotoolkit-unity
via gesture manager?
@Shukenmg,
As @timg already mentioned the Holograms-211 course covers this with some nice code examples and it is using the Holotoolkit-Unity Scripts to do most the heavy lifting. A more striped down alternative than the 200 classes may be checking out the 100 class, Origami: https://developer.windows.com/en-us/windows/holographic/holograms_101#Chapter_3_-_Gestures
This has a section (chapter 3) to use the tap gesture on an object that is much more stripped down and easier to understand. How tap works and sending messages to an object that has been tapped. From there instead of creating rigid components you can use Unity's animation Play function on your properly setup animator component: http://docs.unity3d.com/ScriptReference/Animator.Play.html
Cheers,
Ryan
so Is this right?
oh and if you are wondering shukenmg and dan are the same