PlumCantaloupe / circlesxr

A work-in-progress framework that aims to bring together multi-user XR experiences in learning using WebXR.
https://www.anthony-scavarelli.com/portfolio/circles-webvr-education-platform/
MIT License
15 stars 31 forks source link

Mirrors are broken when using VR mode on an Oculus Quest #21

Closed PlumCantaloupe closed 3 years ago

PlumCantaloupe commented 4 years ago

It appears that the recent standalone browsers (Oculus Browser and Firefox Reality) will only properly report world transforms ( https://github.com/aframevr/aframe/issues/4626 ), and allow parenting to the camera node ( https://github.com/aframevr/aframe/issues/4629 ), when in 2D mode, and not on immersive "VR" mode when using real-time mirrors. This appears to be due to creating a virtual camera for additional renders.

PlumCantaloupe commented 4 years ago

Appears these issues also effect a pure three.js example noted here: https://github.com/mrdoob/three.js/pull/19666#issuecomment-650676991

Glitch code: https://glitch.com/~pure-threejs-mirrortest

PlumCantaloupe commented 4 years ago

Three.js implementation being explored here: https://github.com/mrdoob/three.js/issues/19759

PlumCantaloupe commented 3 years ago

May need a work-around here as last time checked the OQ camera stills does not respect any entities parented to it i.e., a clone of avatar that mirrors avatar movements. More testing needed ...

PlumCantaloupe commented 3 years ago

Currently the mirror doesn't even show up any longer, so going to have to update this code. Perhaps rebuild code from the three.js "WebXR Sandbox ".

Screen Shot 2021-05-12 at 11 04 23 PM
PlumCantaloupe commented 3 years ago

Okay updated A-Frame to 1.2.0 so we get THREE 125 and though that version fixes the body not being attached to the camera in mirror bug in pure three it is still broken in AFrame. Perhaps it is due to this manner if sheeting the camera pose? https://github.com/aframevr/aframe/issues/4806#issuecomment-805231751

Need to review soon to see if there is a workaround. Not clear why A-Frame uses a different approach.

PlumCantaloupe commented 3 years ago

Alright, found a workaround that works with A-frame and have it committed here https://github.com/PlumCantaloupe/circlesxr/commit/366833112c240952bb893474fbff0c9a9873d3a7 . Whew!