ExOK / Celeste64

A game made by the Celeste developers in a week(ish, closer to 2)
1.64k stars 131 forks source link

Stereo panning on FMOD.ATTRIBUTES_3D listener seem to be reversed left/right #94

Open kees- opened 1 month ago

kees- commented 1 month ago

https://github.com/user-attachments/assets/89fc0f9a-6fd7-4abd-bb5c-94feb3512fee

See the attached for a spatialized event emitting from the cassette object. When the listener on the camera is relatively to the right of an object, it will play from the right channel. If my understanding is correct that this is an error and not something I've misconfigured, this is solved by inverting the SetListener ATTRIBUTES_3D position z-plane:

attr.position.x = -1 * camera.Position.X;
attr.position.y = -1 * camera.Position.Y;
kees- commented 1 month ago

Sike, inverting the position isn't a fix at all and the fix only works here because the cassette is near the origin, please disregard my solution, but the problem remains

kees- commented 1 month ago

Actually flipping the whole up vector seems to work (instead of x/y) as per this forum post.

attr.up.x = -camera.Up.X;
attr.up.y = -camera.Up.Y;
attr.up.z = -camera.Up.Z;