-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object3D.getWorld*() with cameras do not work when WebXR is presenting. #18448
Comments
There is an unfortunate dependency when using You can avoid this problem by doing this in your cameraWorldPosition.setFromMatrixPosition( camera.matrixWorld ); or by setting Besides, avoid to create an instance of |
Ahh, thank you for the workaround! (And yeah, I just put that Vector3 there so the demo would be as brief as possible…) |
Description of the problem
If an object has an onBeforeRender function which calls getWorldPosition on the
camera
argument, and the user is in VR, then that object (and any rendered after it) will stick to the user's face, as though the VR camera jumped to the origin mid-render.Example: https://ravenworks.ca/temp/threeOBRcamerabug/
Three.js version
r112 (and some earlier, though I'm not sure exactly where it broke; this used to work in 2017, but it doesn't now.)
Browser
my demo only runs in Chrome because of Three dropping WebVR support, but the same bug happens in Firefox if using A-Frame (that's how I discovered the bug)
OS
only tried on Windows 10
Hardware Requirements (graphics card, VR Device, ...)
Oculus Rift
The text was updated successfully, but these errors were encountered: