Yeah, would be cool if you could quickly do that, then I don't write wrong stuff in the book
It seems like nitram_cero is the only guy who ever took a detailed look at SFML's sound spatialization. He also wrote this
great article, and the funny game
The Duke He also wrote
here:
I came to this conclusion:
If you have a up vector +Y, and at(target) vector -Z... it leaves +X=right and -X=left.
The target vector is actually "depthness", which is played (or should be) as "further inside the monitor" (which we'll probably never use)
Y is Up, so if you wan't something making a falling sound, this is your axis.
And that's the same as a plataformer! You really want things falling (Y screen axis) to be represented like the're coming from "up" (Y sound axis). Actually it's opposite sign.
How it's now it's actually correct!
I'm not sure if I understand him correctly, like me he talks about the opposite sign. But he also mentions that the way it was was actually correct, which I don't understand.. was it different than now?
In a platformer, a falling object's graphical Y coordinate continuously
increases. In sound coordinates, Y
decreases, since +Y is "up". So if we map the coordinates 1:1, the Y audition will be inverted, the object will seem to go upwards.