Overv / WebCraft

Minecraft clone written in Javascript.
zlib License
388 stars 188 forks source link

mouse/pointer lock (navigator.pointer.lock) #5

Closed 525c1e21-bd67-4735-ac99-b4b0e5262290 closed 4 years ago

525c1e21-bd67-4735-ac99-b4b0e5262290 commented 12 years ago

http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html https://developer.mozilla.org/en/API/Mouse_Lock_API

brg2 commented 12 years ago

Added a workaround similar to http://ejones.github.com/scroll-mouselook-demo/

p3rlphr33k commented 8 years ago

can someone elaborate on adding the pointer lock to webcraft? I have added the code so it locks in the pointer when the canvas is selected, the coordinates can be displayed in the console, but the movements do not register with the game and No errors. I used the example canvas loop function to call the mouse movefunction without luck..