nhudinhtuan.github.io icon indicating copy to clipboard operation
nhudinhtuan.github.io copied to clipboard

Is it possible using both hands?

Open DSPNeves opened this issue 7 years ago • 1 comments

Hi everyone!

Is it possible to configure using both hands? Right now the camera detects only one hand, and I want to use both hands to trigger a specific function.

Other issue that I have is using two "hand gestures" at the same time, I tried using conditionals, if I use one by one it works great, but if I put them together, it just works left,right, up, down, but I want to put my hand in UpLeft position to trigger some function.

Here is some sample of my code

if (gesture.isLeft) { console.log("Moving Right"); }else if (gesture.isRight) { console.log("Moving Left"); }else if (gesture.isUp) { console.log("Moving Up"); }else if (gesture.isDown) { console.log("Moving Down"); }else if (gesture.isDown && gesture.isLeft) { console.log("Moving Down and left"); }else if (gesture.isDown && gesture.isRight) { console.log("Moving Down and right"); }else if (gesture.isUp && gesture.isLeft) { console.log("Moving Up and left"); }else if (gesture.isUp && gesture.isRight) { console.log("Moving Up and right"); };

Thanks in advance! :)

DSPNeves avatar Feb 28 '18 11:02 DSPNeves

Hey! Maybe you could do this by using the handPos property :)

Atap23 avatar Jun 01 '19 23:06 Atap23