I’m trying to grasp the documentation on the forward- and up-vector in Studio::System::setListenerAttributes(), but the documentation confuses me.
First of all I’ve created the system with FMOD_INIT_3D_RIGHTHANDED to align with my game’s right handed world coordinate system North(x)East(y)Down(z).
Now I would assume, that for a listener staring to the north, the forward-vector would be (1, 0, 0) and up-vector (0, 0, -1). Yet the documentation states:
When configured for a right-handed coordinate system the positive Y axis points up, the positive X axis points to the right, and the positive Z axis points towards the listener.
Is this just an example of a RH-coordinate system? Or is for the above north staring listener forward (0, 0, -1) and up (0, 1, 0)?
What you’ve quoted from the documentation gives the definition of a RH coordinate system, specifically regarding the direction the Z axis points and the direction of rotation around an axis relative to when X+ is right and Y+ is up. The actual direction of all three axes as a group is irrelevant besides these relative characteristics, so for your purposes, it is just an example.
Based on what you’ve described, when using the Studio API and providing 3D attributes from your game, your forward vector would be (1, 0, 0), and your up vector (0, 0, -1).
For 3D spatialization to behave intuitively and prevent coordinate system transformations it is important that FMOD is configured to use the same handedness as your game’s coordinate system.
By default FMOD uses a left-handed coordinate system.
FMOD may also be configured to use a right-handed coordinate system by passing FMOD_INIT_3D_RIGHTHANDED to System::init.
No problem, happy to hear that my response clarified it for you.
I’m not sure about completely removing all that information, especially it is a glossary entry on handedness in general, and the importance of coordinate system handedness may not be known to some users. However, I do agree that the glossary entry could be restructured to be clearer to the reader, and I’ve marked this section for changes on our internal feature/improvement tracker.