Follow the Mouse Cursor

In the previous article, we looked at some boring things about working with the mouse in our code. In this tutorial, we will start to apply some of the things we learned by creating a simple “mouse follow” example. It looks a bit like this:

Move your mouse cursor over the gray area to see the red circle follow your movements. In the following sections, you'll learn all about how to make something like this work...and then some!

Onwards!