RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

AudioSystem shouldn't be touching the OpenAL listener position

Open metalgearsloth opened this issue 1 year ago • 1 comments

The issue is if you get frame-drops then the position delays or the likes can cause the audio to come out of different ears.

Ideally ListenerPos would always be 0,0 and we would just update the relative positions of audio. This means any audio sources playing on top of us should always sound correct.

metalgearsloth avatar Nov 27 '23 12:11 metalgearsloth

Reconsidered, this is probably easiest way to go, also OpenAL supports a source-relative flag for audio.

I think easiest thing to do is get the EntityCoordinates for audio, then get it as EntityCoordinates relative to the listener's EntityCoordinates and use that. Then Listener Position + Rotation can probably still be set as per normal.

metalgearsloth avatar Nov 28 '23 10:11 metalgearsloth