How does swipe gesture with leap motion trigger GUI?
I am working with leap motion and it has swipe gesture. I wish I can trigger GUI after I finish the gesture but have no idea where to start with.
This is the video I am trying to make.
https://www.youtube.com/watch?v=jLp3W1gbhRk
And I successfully made unity recognise my swipe motion and here is the Update part of the script.
void Update () { Frame frame = controller.Frame (); GestureList gestures = frame.Gestures (); for (int i = 0; i 0){ GUI.Button (new Rect(0,0,0,0),"Button up"); Debug.Log("Up"); } }else if(gesture.Type == Gesture.GestureType.TYPE_SCREEN_TAP){ ScreenTapGesture tab = new ScreenTapGesture(gesture); Vector TabDirection = tab.Direction; Pointable poker = tab.Pointable; if(TabDirection.z<0){ Debug.Log("pull"); }else if(TabDirection.z>0){ Debug.Log("push"); } } } }
What's the next step of this? Please share your knowledge here. Thank you in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220612044759im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to move the part of the rigidbody by script? 0 Answers
VR/AR motion capture with iPhone 11 0 Answers
Voice Command using HoloToolKit 0 Answers
How to move the part of the rigidbody by script? 0 Answers
Info based on trails. motiontracking 0 Answers