I 'EnableKeys' in OrbitControls but WASD or cursor keys don't do anything

As said above, when I check EnableKeys in the OribtControls settings, it doesn’t seem to do anything.

Maybe I am missing something about giving focus or there is a special way to enable them like a SHIFT key or something?

Original Post on Discord

by user 563549194137239552

Hey - noticed that a few days ago too. I’m not quite sure why tho as we just pass that setting to the threejs orbit controls (from examples) and we dont prevent any key events anymore if I’m not mistaken :thinking:

ok… now worries then… maybe a new bug… but my expectation is WASD would normally let me move around and turn as in a normal FPS type setup

by user 563549194137239552

I think by default it uses LEFT RIGHT etc arrow keys three.js docs

Oh there’s no ā€œenableKeysā€ anymore (or at least not in the docs - that’s strange)

hopefully that leads you to a fix!

by user 563549194137239552

Ok looks like we dont call listenToKeyEvents - not sure if that’s new but adding this with the document.body works (doesnt work with the canvas element - checked the whole codebase and couldnt find any code on our side that prevents key events there so still not sure about that but with the body it kind of works - it’s not great i tho i have to say)

I would recommend writing a little script yourself to move the camera :sweat_smile:

will still add the fix for the next version

ok… just tried the world in a VR headset and I can move around great… but I can’t ā€˜click’ the canvas button… the ray pointer hits the button and it even highlights the button when i hover but trigger, grip, joystick button etc. doesn’t seem to activfate the button

by user 563549194137239552

I can wait for the next version for a fix… just good to know its not something i am doing wrong… i can navigate by clicking the floor so for now it’s good

by user 563549194137239552

this is in a Windows mixed reality headset if that helps… launches very nicely from the VR button!

by user 563549194137239552

Oh mixed reality headset :thinking: can you try if the Button sample scene works (in Samples Projects | Needle Engine Documentation) Ive just tested it here on quest 2 and that works fine

we havent tried on that headset before so my guess right now would be that the button layout we currently have kind of hardcoded right now might be the problem

I will… but i al;so just tried on Quest 2 and also couldn’t activate my button… using the Mavic? browsder … but if i use the Mavic browser on quest and DON’T enter VR… i can orbit around and stuff using the contr4ollers and clicking on the unity button actually works

by user 563549194137239552

so it’s not working but only when in VR mode

by user 563549194137239552

Ok good - then its something else :thinking: let’s see if the button sample works

this one here

It’s not setup for XR in the sample so you need to add a WebXR component to the gltf file somehere

yeah… i don’t have the sample assets in my project… do i pull them in from the package manage page?

by user 563549194137239552