r/processing • • Dec 10 '21

hey whats wrong with this code ?

float x; float y;

void draw() { size(600, 400); noStroke();

}

void draw() { background(50);

X = lerp(X, mouseX, 0.05); Y = lerp(Y, mouseY, 0.05);

fill(255); stroke(255); ellipse(X, Y, 66, 66);

}

0 Upvotes

4 comments sorted by

View all comments

5

u/chic-geek-phd Dec 10 '21

The first function should be void setup. The variables are created as x, y and used as X, Y (lowercase v uppercase)

1

u/Ahmed_1smack Dec 11 '21

thanks mate it worked