pc.CameraComponent.enterVr registers cursor key events?

Just recently my project that uses the PlayCanvas provided web-vr-ui.js (which calls enterVr) started rotating the camera.


  • Why is this default behavior?
  • How can I remove it?
  • Is this logic not committed to any of the branches on github (I can’t seem to see anything that suggests this behavior in camera component.js)?

I was also surprised to see that a previously published build also inherited this new behavior. That seems… hmm…

What do you mean by it ‘rotating the camera’? Do you have public project available to look at?

If I press the left cursor key, the camera will gradually clock its yaw to the left, if I press the up cursor key, the camera will do the same with pitch, and so on.

The stock VR project template is sufficient for reproducing this behavior.

I just tried with a Windows machine (as I’m using Linux at home) and I see the same (new) behavior. I’m using Chrome.

Also of note, I no longer see the “No VR display or headset is detected.” text display immediately. I definitely don’t have VR hardware connected.

I didn’t update Chrome, although I have since updated it.

I see what you mean now.

The WebVR implementation has changed since I last looked at and looking at window.WebVRConfig has MOUSE_KEYBOARD_CONTROLS_DISABLED set to false which may be why the cursor keys are moving the camera. @dave may have more ideas?