FMExListener3D Class
This class describes the position, orientation, and velocity of the "listener" entity when using 3D audio. Create a new FMExListener3D and assign it to the FMEx.Listener3D property when using 3D audio. From that point on simply update the listener as needed and FMOD Ex will do the rest. Note that this class lacks getter methods and is meant to be wrapped by objects that maintain position, orientation and velocity using higher-level vectors and quaternions (e.g. update the listener as part of a 3D player or camera class).
Important: You must call FMEx.Update for every frame of your simulation when using 3D audio.
Tip: Advanced users can access the listener vectors with direct pointer access via undocumented "xFMEx" prefixed properties. These are guaranteed to be valid during the life of the listener object and point to 12 bytes of memory each (3 single precision floats per vector).
Methods
-
SetForward ( x As Double, y As Double, z As Double )
Sets the forward-pointing 3D vector for the listener. This should be a normalized vector perpendicular to the Up vector. -
SetPosition ( x As Double, y As Double, z As Double )
Sets the position of the listener in global 3D space. -
SetPositionOrientationAndVelocity ( _
posX As Single, posY As Single, posZ As Single, _
vfX As Single, vfY As Single, vfZ As Single, vuX As Single, vuY As Single, vuZ As Single, _
velX As Single, velY As Single, velZ As Single )Sets the position (posX,posY,posZ), forward (vfX,vfY,vfZ) and up (vuX,vuY,vuZ) orientation vectors, and the velocity vector (velX,velY,velZ). This is the most efficient update method if two or more parameters change during a single frame. -
SetUp ( x As Double, y As Double, z As Double )
Sets the up-pointing 3D vector for the listener. This should be a normalized vector perpendicular to the Forward vector. -
SetVelocity ( x As Double, y As Double, z As Double )
Sets the velocity vector (direction and speed) of the listener.