how to replace "mouse*****" with "hands"?

I want to replace codes relate with mouse like 'mousePressed' with hand (with Leap motion). My plan is when my hands comes out on Leap motion, Screen changed other sketches.

here some parts of codes.

 if (mousePressed) {
      PVector mouseVec = new PVector(mouseX, mouseY, 0);
      particles[i].addAttractionForce(mouseVec, width, 1.0);

based on https://gist.github.com/tado/0f281c69e00a967f60d9

Tagged:
Sign In or Register to comment.