Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by dmen

Is it possible to capture mouse position when the mouse is outside the canvas window? Be great if you could do mouse lock like in old school 3d games... I have a game where the user drags an entity back and forth to capture falling things - be nice if the mouse didn't have to be within the canvas to work.

possible?

1 decade ago by Akis

What you need is to lock the mouse to your canvas, and it's possible with Chrome and Firefox using the Pointer Lock API.

http://www.html5rocks.com/en/tutorials/pointerlock/intro/
Page 1 of 1
« first « previous next › last »