playcanvas / playcanvas/engine

XR frame `pose === null` should be a valid state

Open
#4,675 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

Based on the WebXR Spec, pose can be null which is returned from frame: https://www.w3.org/TR/webxr/#dom-xrframe-getviewerpose
This can be due to many reasons: no tracking available, failure in subsystem to track, etc.
Previously engine assumed that pose is available always, which lead to an issue with Oculus Link, which did not provide pose, and it lead to an exception.
A fix: https://github.com/playcanvas/engine/pull/4517 made a workaround, but it completely skips other XR system updates and prevents rendering, which is an issue, as some level of rendering and developer ability to render some UI should be still available.
This is especially apparent in AR session, for the first few seconds where tracking is not available, the developer should be able to provide UI to ask for device movement recommendations to the user, which should be rendered of course.

We need a better solution to this issue, and ensure rendering and other XR subsystems can handle null pose case gracefully.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the WebXR specification section for XRFrame.getViewerPose and the workaround in pull request 4517. Trace how a null pose currently affects XR system updates and rendering; done means null poses are handled gracefully while updates continue and UI can still render.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
ar-vr-xr
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.