Spatial sound: Sound does not follow a TransformNode, but a Mesh

Hi all!

Moving around a TransformNode that is attached to a Sound does not deliver the expected attenuation by distance from the camera. It works with a Mesh though.

Demo: https://www.babylonjs-playground.com/#EDVU95#24

My misunderstanding of the API??

. J

It’s not you, apparently Sound still expects a mesh here:

Here is a playground with the original _onRegisterAfterWorldMatrixUpdate commented out, and a modified version that fixes the bug:

https://www.babylonjs-playground.com/#EDVU95#26

1 Like

And a PR:

5 Likes

Thanks a lot!

1 Like