In this video I look at how to calculate a vector that points from an object to the mouse. This vector is used as a “force” to pull the object towards the mouse position.

The Nature of Code

Twitter:

Example code:

Help us caption & translate this video!