Easy question, lag effect when drawing

edited February 2017 in Questions about Code

here is code that allows you to draw

void setup() {
  size(500,500);
}

void draw() {
  strokeWeight(5);
  line(mouseX,mouseY,pmouseX,pmouseY);
}

what could I do to pmouseX and PmouseY that would create a lag effect as in how could I make the line following the mouse follow at a reduced pace.

Tagged:
Sign In or Register to comment.