Shared publicly  - 
 
Today's task was doing a simple Pointer Lock API example for +three.js.

http://mrdoob.github.com/three.js/examples/misc_controls_pointerlock.html

Source code:
https://github.com/mrdoob/three.js/blob/master/examples/misc_controls_pointerlock.html
https://github.com/mrdoob/three.js/blob/master/examples/js/controls/PointerLockControls.js

Sadly +Mozilla Firefox only allows locking the pointer in fullscreen. Hopefully they'll eventually allow pointerlock in non-fullscreen too.

Thanks to +Vincent Scheib for the help!

EDIT: Btw, if for any reason you feel the urge or reaching the top, looking down while jumping helps ;)
27
15
Christof Jans's profile photoДимитър Тодоров's profile photoDave Geddes (geddski)'s profile photoKris Hom's profile photo
16 comments
 
I don t understand why they are making a difference between fullscreen and chrome window for that kind of functionnality...
They ve done the same on Firefox mobile for the device orientation locking: it can only be done in fullscreen mode too... Can't find any explanation why.
 
Isn't working on Chrome Version 23.0.1255.0 for Win. Full screen or not.
 
I see a lot of z-fighting on some cubes... maybe 2 cubes generated on the same place?
 
Using Canary (not sure about the exact version number but it's a recent one) the fullscreen switch doesn't occur. Pointer disapear but moving mouse doesn't have any effect.
Pressing escape makes the pointer come back.

On Chrome (22.0.1229.64 beta-m) same problem with the fullscreen switch, but mouse move are working ok.
 
Oh ok, i missed that point.
Mouse move problem only occurs on Canary, i guess that could be caused by the browser.
 
+Etienne Durand Yeah, I usually don't bother with things not working in Dev/Canary. I start to care when things don't work on Beta :)
 
Well, everything seems to be ok then.
Thanks for your work by the way :o)
 
Last time I checked, the WASD keys were blocked when when the pointer was locked. Good thing that now they're not! Here come the WebGL FPSs!
Add a comment...