進度暫存
LeapMotion leap;
PVector pos =null;
PImage ball;
void setup(){
size(800,600,P3D);
ball = loadImage("ball.jpeg");
leap = new LeapMotion(this);
}
void draw(){
background(255);
for(Hand hand : leap.getHands()){
if( hand.isRight() ){
Finger finger_1=hand.getIndexFinger();
pos = finger_1.getPosition();
image(ball, pos.x, pos.y, 50, 50);
}
}
}
沒有留言:
張貼留言