We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I'm very new to processing and I wanted to try something out, this is the code so far
int x, y; void setup() { size(400, 300); x=-50; y=-50; }
void draw() { background(250, 250, 200); fill(100, 150, 250); ellipse(x, y, 50, 50); line(mouseX, y+25, x, y+25); x=x+1; }
void mousePressed() { x=mouseX; y=mouseY; }
The problem is that when I move the mouse away, the line origin still follows my mouseX value, Ideally I want to be able to click on the page and have the circle move to the right while it "draws" the line underneath. So, if someone can send me a revised code for this where the line wont follow my mouse, that would be a massive help
Answers
Sorted myself, all I had to do was make two values for mouseX xDDDD