But that implies that [ -1, 0, 0 ] is equal to [ 0, 0, -1 ], which is the default direction. Is that really true?Sorry but I don't get it. What do you mean?
How about [ -1, 0, -1 ] then?
I thought about doing it like you suggest, but then some sounds would be "behind" the listener, and I can't figure out if it makes a difference.It makes a difference if you have front and back speakers, it doesn't if you have simple stereo speakers.
What I meant was, that your solution implied that a listener direction of [ -1, 0, 0 ] would have the same effect as [ 0, 0, -1 ], but you already clarified that that was not the case. At least not if the user has surround sound.QuoteBut that implies that [ -1, 0, 0 ] is equal to [ 0, 0, -1 ], which is the default direction. Is that really true?Sorry but I don't get it. What do you mean?
How about [ -1, 0, -1 ] then?
What I meant was, that your solution implied that a listener direction of [ -1, 0, 0 ] would have the same effect as [ 0, 0, -1 ]I still don't get it. Why would a listener oriented along the X axis would be the same as one oriented along the Z axis?
But what all this means, if I understand you correctly, is that there is currently no way of aligning the listener with a view, if the view is rotated.I don't get that too. Why wouldn't you be able to rotate the listener the same way as the view? You can use any position and orientation in 3D, there's no limitation.
Because you said so. My original question was about rotating the listener around the z-axis, just like sf::View, not facing the listener in different directions in 3D space.QuoteWhat I meant was, that your solution implied that a listener direction of [ -1, 0, 0 ] would have the same effect as [ 0, 0, -1 ]I still don't get it. Why would a listener oriented along the X axis would be the same as one oriented along the Z axis?
Yes, the limitation is that you can't rotate the listener. That makes it impossible to align the 3D listener to the 2D view.QuoteBut what all this means, if I understand you correctly, is that there is currently no way of aligning the listener with a view, if the view is rotated.I don't get that too. Why wouldn't you be able to rotate the listener the same way as the view? You can use any position and orientation in 3D, there's no limitation.
Because you said so.is obviously wrong.
There's obviously something that you don't understand, but I don't know what ;DThat is likely, but there must also be something in my argumentation that you don't understand. Otherwise you would be able to point out my error more clearly. :)
If sf::View is the eyes of the user, then sf::Listener is his ears (by the way, they are often linked together -- same position, orientation, etc.).My argument is that linking the orientation of the two is not possible because they are conceptually different. Here is why:
To be clear: you can set any position and any rotation for the listener. So you're not forced to have it in front of or behind something -- if it's the case then adjust the coordinates.This is not true. You can't set rotation for the listener, only orientation. Therefore it is not possible to truly link the 3D listener to a 2D view, and a compromise must be made.
On the other hand, you cannot describe 3D orientation from a 2D perspective. There simply is no equivalent.Ok but we don't mind, here we want to link the listener to the view, not the other way round :)
This is not true. You can't set rotation for the listener, only orientation.What's the difference? An axis/angle can always be converted to a direction.
Therefore it is not possible to truly link the 3D listener to a 2D view, and a compromise must be made.It's not a compromise, a 2D rotation is equivalent to the vector that I gave in my first post: (cos(a), sin(a), 0). That is, if you consider the 2D plane being XY. You can use other planes (XZ or YZ) with the same results.
Furthermore, I postulate that the compromise you suggest, will inevitably result in positioning some sounds behind the listener.
I hope that explains my position more clearly, so you can easily point out any misconceptions I may have.I think you don't realize that you can define any 2D rotation with a 3D vector -- 3D is a superset of 2D so why would there be limitations and compromises to do? ???
What's the difference? An axis/angle can always be converted to a direction.Let's say we have a friend named Magnus. All we know about him is that he is looking at the sun. From that information, how can we tell if he is up side down? We can't. That information is not contained in direction. Magnus is rotated around an axis, but we have no way of knowing, since all we know is his orientation.