Sensing
An example which shows the usage of isTouchingMousePointer and custom hitboxes.
Run it here
Click the stage first, so that it gets the keys. Move one of the heroes with W, A, S and D, turn it with R and let it walk forward with space; it says "Hit" while it touches another hero. Point at a hero and it changes its costume. 0 and 1 zoom out and in.
To run it on your own computer, copy the folder sprites of the
source code next to the program.