Problem with mouseY: I can’t bring animation to work

I have used mouseY in my project but i cnt see any animation, there is no error on the console as well. Can someone please tell me the cases wherein mouseY is suppressed

add behind a line

println(mouseX, mouseY);

and you see if the values change.

1 Like

Actually I have a rect(360,mouseY.10,70);
i aint able to bring animation in y coordinte

Hello nausheen
The problem might be that “rect(360,mouseY,10,70)” isn’t int the void draw(){} section of your project and hence doesn’t get updated. Try the following code:

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

void draw(){
  background(255);
  fill(0);
  rect(360,mouseY,10,70);
}```
2 Likes

Hello,

Explore the resources here:
https://processing.org/

The Tutorials have a section on Interactivity.
The Examples have mouse examples.
There are References for mouseX and mouseY.
And lots more on the site to explore!

:slight_smile:

3 Likes