Closed cyber-hub closed 4 years ago
Experiencing the same thing with an Oculus Rift S.
Sadly experiencing the same issue with oculus quest
I see the same issue with Firefox Reality on Quest, while it seems to work correctly on Oculus Browser.
I tested also on Firefox and Chrome desktop using the WebXR emulator and I found random behaviour.
I believe it's some async issue when the default camera is initialized. The index.html
doesn't have any camera so aframe is injecting initially a default one (and activating it), but then in player.js
a new one is created and added to the player
entity (https://github.com/talkol/spiderman/blob/master/player.js#L24-L34).
Some things I tried:
works If I force setting the player's camera.active = true on the player's tick
it works as expected and everything moves as expected:
this.camera.setAttribute("camera", "active", true);
doesn't work If instead of using the code on player.js
to create the camera entity, I create on the HTML a <a-entity>
camera:
<a-entity player="mass: 70" position="0 0 0">
<a-entity id="camera" camera=""></a-entity>
</a-entity>
And then instead of creating a new node, I just grab that one:
this.camera = document.getElementById('camera');
this.camera.setAttribute("look-controls", "");
...
works If I create the camera
node as the above example, but I don't grab that node when creating the camera, so I'm creating a new entity with a camera there, it works ? the only difference is that the default camera is not being injected.
I've submitted a PR (https://github.com/talkol/spiderman/pull/7) with the first change, just as a workaround that fixes the behaviour, but ideally that's should not be the final solution here.
Any hint of what can be going on here @dmarcos ?
actually I believe it should be enough to force the activation in the play
instead of doing it on each tick
, that was just a big of brute-force approach :)
I haven't investigated. Moving all those entities created programmatically to the HTML will clean things up and likely problems will go away:
<a-entity player="mass: 70" position="0 0 0">
<a-entity camera look-controls raycaster="..." position="0 1.6 0" wasd-controls></a-entity>
<a-entity hand="left" raycaster="..."></a-entity>
<a-entity hand="right" raycaster="..."></a-entity>
.
.
.
</a-entity>
Hi, nice idea I would like to play, but sadly hands are in the air above the head and move away after triggerpress on oculus quest.