3 ms·
As with most first-person WebGL projects, things go wrong when the mouse pointer leaves the canvas area. Is there anything that can be done to "capture" the po
by dasmoth 15y ago
As with most first-person WebGL projects, things go wrong when the mouse pointer leaves the canvas area. Is there anything that can be done to "capture" the pointer (that isn't horribly open to abuse...)?
- MatthewPhillips 15y agoThe Point Lock API[1], not yet implemented except in experimental branches. [1]https://developer.mozilla.org/en/API/Mouse_Lock_API https://developer.mozilla.org/en/API/Mouse_Lock_API
- Toji 15y agoIt's already there. If you run the demo with a dev version of Chrome going into fullscreen mode locks the mouse cursor and gives you more traditional FPS controls. This should be making its way into the stable versions of several browsers within the next few months.
- ck2 15y agoGoogle Maps does something to capture the mouse - unless you mean without buttons being held.