Pointer Lock Controls WASD

I’m trying to recreate the Pointer Lock Controls from three.js examples but having trouble getting the controls to work, see my code here: Glitch :・゚✧ any help would be appreciated

The mouse is not captured automatically at application start since this is technically not possible. It’s required to use a mouse interaction to trigger the mouse lock. The official example uses a simple splash screen for this purpose.

I suggest you study the underlying Pointer Lock API for more background information:

https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API

I’ve added a splash screen but still can’t get the controls to work, see my code here: Glitch :・゚✧ is there something I am missing?

I’ve answered you here: Splash screen for pointer lock controls - #2 by Mugen87