Skip to content

feat: listener-anchored PHASE sources - #110

Open
Rubeanie wants to merge 1 commit into
apple:mainfrom
Rubeanie:listener-anchored
Open

feat: listener-anchored PHASE sources#110
Rubeanie wants to merge 1 commit into
apple:mainfrom
Rubeanie:listener-anchored

Conversation

@Rubeanie

@Rubeanie Rubeanie commented Sep 4, 2026

Copy link
Copy Markdown

Description

On visionOS, the shared listener pose is hidden, so parent the PHASE source under the listener.

SetListenerAnchored(bool) controls anchoring and IsListenerAnchored() reports it. Anchored sources send their Unity local transform, so parent the GameObject under the listener.

source.transform.SetParent(listener.transform, false);
source.transform.localPosition = headRelativeOffset;
source.SetListenerAnchored(true);

The native entry point PHASESetSourceListenerAnchored detaches first, returns the source to root on failure, and returns early if already parented. Listener destruction returns children to root, while recreation reanchors them.

The Matrix4x4 overload handles conversion; the Transform overload is addressed by #109.

Testing

Tested on Vision Pro with visionOS 26. Three device runs on 2026-09-04 showed PHASE read back matching Unity at zero delta, including scene reentry. Sources were head locked by ear and are in production use.

Depends On

@Rubeanie
Rubeanie marked this pull request as ready for review September 4, 2026 09:19
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.

1 participant