nhudinhtuan.github.io
nhudinhtuan.github.io copied to clipboard
Is it possible using both hands?
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! :)
Hey! Maybe you could do this by using the handPos
property :)