soloud icon indicating copy to clipboard operation
soloud copied to clipboard

Left-Handed Coordinate System

Open Elvithari opened this issue 10 years ago • 3 comments

I think that Left-Handed Coordinate System option for Direct3D applications doesn't work as expected. Its used to negate one column of LookAt matrix only, which doesn't quite do the trick, I believe. Using this flag and my unmodified D3D coords resulted in wrong 3d sound perception. How I solve the problem was simply using SoLoud without Left-Hand flag but negating every "Z" coordinate that I pass to sound sources and listeners. I guess it's an easy fix that will make using your awesome library with D3D a no-brainer ;)

Elvithari avatar Jun 26 '15 10:06 Elvithari

Sigh.. see issue #94 Maybe I should just add another flag for Z negating or something.

jarikomppa avatar Jul 02 '15 08:07 jarikomppa

Adding a flag for Z-negation doesn't seem like a big complication so maybe it's a good idea. I'm not sure if the author of #94 faced the same issue that I had. I'm just saying that negating all Z values passed to SoLoud and not using LEFT_HANDED_3D fixed the problem in my case and I'm using DirectX11. I don't think it's a major issue. Probably any programmer can deduce to flip Z axis when he hears the sound from the wrong speaker but adding such flag to the sound engine wouldn't do any harm also ;)

Elvithari avatar Jul 03 '15 10:07 Elvithari

Perhaps a more generic way would be to get rid of the flag and require the client to pass in forward, side, and up vectors for the listener.

petrihakkinen avatar Jul 19 '15 16:07 petrihakkinen