Home 09: Exercise - Follow the mouse
Content
Cancel

09: Exercise - Follow the mouse

Let your emoji follow your mouse.

Solution

Here you can find the solution for the exercise in a video.

To move your emoji you can just use mouseX and mouseY instead of a fixed x or y value.

1
2
3
4
5
6
7
8
function emoji(x, y) {
  // Your emoji code
}

function draw() {
  clear();
  emoji(mouseX, mouseY);
}
This post is licensed under CC BY 4.0 by the author.
Contents