Skip to content

Object3D.getWorld*() with cameras do not work when WebXR is presenting. #18448

@omgitsraven

Description

@omgitsraven
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions