Update mouse position on mouse click and mouse release

Fixes issues with projectile firing direction when refreshing the page.