Manish Goregaokar

Results 596 comments of Manish Goregaokar

The problem is that you have to _manually_ send the pose data to webAudio, which carries some overhead. Ideally, WebAudio would have a mode where it could be told "the...

@kearwood and I discussed this a bit and he brought up that a nice API for this would be to allow attaching XRSpaces to the AudioListener and PannerNodes, and implementors...

You don't need any special math for this, provided that you place your panner nodes appropriately based on your `xrReferenceSpace`, you can just use `getViewerPose`'s `transform`'s position/orientation directly. Ideally, though,...

> OK, what xrReferenceSpaces can translate directly to the vector in Web Audio? It doesn't matter, as long as it's origin is stationary (so, not `viewer`). Just use `local` or...

Just use `pose.transform.position` and `pose.transform.orientation` with `listener.setPosition()` and `listener.setOrientation()`. In `setPosition()` make sure to normalize by dividing x, y, and z by w.

Oh if `w` is always 1 you don't need to divide, then.

But yeah, that's correct. You can use `setPosition()` and `setOrientation()` to do it atomically, different browsers handle checkpointing differently here.

Oh, I didn't realize WebAudio orientations weren't quaternions, my bad

Why do you want to use the viewer reference space? The whole point is to use a reference space whose origin is stationary, which is roughly true for all of...

What do you mean by "viewer mode"? Which reference space you pick is irrelevant provided you pick one which is roughly _stationary_, in all of these cases the code will...