Skip to content

Runtime error with PlayCanvas due to mismatch between native WebXR implementation and emulation runtime #17

@mrxz

Description

@mrxz

When using the immersive-web-emulator on a PlayCanvas application in Chrome, the following exception occurs when starting the XR session:

Immersive VR failed to start: this._manager.session.getTrackedImageScores is not a function

The cause for this does lie within PlayCanvas, as it performs feature detection for the WebXR Marker Tracking Module based on the existence of the XRImageTrackingResult class (see playcanvas/engine#5365). While I do think PlayCanvas could, and perhaps should, rely on enabledFeatures instead, it's backwards to change an engine based on an emulator.

This does highlight a potential source of issues when the native WebXR implementation of the browser supports a different feature set than the emulation runtime. Ideally the native implementation is completely overridden when the emulation runtime is loaded, ensuring a consistent environment. Overriding/deleting classes belonging to unsupported WebXR modules/APIs could be an option, but might become tricky when considering name changes and experimental/draft implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions