This is a screen shot of my first try at my concept. The ball was following the mouse and the line wouldn't stay where I drew it, there is no sound at this point. It's not finished obviously but a pretty monumental step for me, getting the ball to move and getting the mouse to draw a line!
float x = 250;
float y = 50;
float directionx = 1;
float directiony = 1;
 void setup (){
  size(500,500);
    background(0);
  }
 void draw (){
  smooth();
 background(0);
 ellipse(x,y,50,50);
 x=x+directionx;
directionx=(mouseX-x)/15.0;
  y+=directiony;
directiony=(mouseY-y)/15.0;
 if (mousePressed) {
      smooth();
      stroke(255);
      line(mouseX+55,mouseY+55,pmouseX,pmouseY);
    }
}

No comments:
Post a Comment