Skip to content

Fix head pose delivery to the camera on headset - #381

Merged
doranteseduardo merged 1 commit into
ReactVision:developfrom
entiendoNull:openxr-head-pose
Sep 18, 2026
Merged

doranteseduardo merged 1 commit into
ReactVision:developfrom
entiendoNull:openxr-head-pose

Conversation

@entiendoNull

@entiendoNull entiendoNull commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

EDIT: Just realized there's a develop branch. I rebased onto it and changed the base, and re-ran the manual tests I did.

Why

It is currently not possible to read the head position on Meta Quest. The scene camera stays at the origin, so onCameraTransformUpdate never fires, getCameraOrientationAsync returns zeros, and a passable ViroPortalScene never reports enter or exit.

b7623b1bdee74f568bd28850644791d7.mov

Positions do not change.

How

The renderer reads the camera position from one place, its point-of-view node. The OpenXR renderer now owns such a node and writes the head position into it every frame. The camera transform event is sent once per frame from the OpenXR input controller, right after the frame is prepared, so it carries the pose of the frame being drawn.

If an app sets its own camera through setPointOfView, that camera replaces this node, as on the other VR platforms.

8b70f537f2974ec2895a72288c65a086.mov

Test Plan

I ran this on a Quest 3 with react-viro 2.58.1 and had Claude analyze the logcat output.

Over a 48 second session the event arrived about 90 times a second, once per frame, and the position from onCameraTransformUpdate tracked the one from getCameraOrientationAsync as I moved around. With the stock renderer the same scene logged zero events and a position of 0 0 0.

To check it yourself:

<ViroScene
  ref={sceneRef}
  onCameraTransformUpdate={(t) => console.log("event", t.position)}
/>

// or pull it on demand
const { position } = await sceneRef.current.getCameraOrientationAsync();
console.log("async", position);

@entiendoNull entiendoNull changed the title Fix head pose delivery to the camera on Meta Quest Fix head pose delivery to the camera on headset Sep 17, 2026
@entiendoNull
entiendoNull changed the base branch from main to develop September 18, 2026 13:00
@doranteseduardo doranteseduardo mentioned this pull request Sep 18, 2026
2 tasks
@doranteseduardo
doranteseduardo merged commit d07a5ce into ReactVision:develop Sep 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants