fix incorrect audio direction calculation

This commit is contained in:
envision3d
2023-03-05 03:50:51 -06:00
parent 4ce89f56cc
commit b450c65c93

View File

@@ -314,12 +314,14 @@ void AudioBackendOAL::Listener_TransformChanged(AudioListener* listener)
const Vector3& position = listener->GetPosition();
const Quaternion& orientation = listener->GetOrientation();
const Vector3& flipX = Vector3(-1, 1, 1);
Vector3 alOrientation[2] =
{
// Forward
orientation * Vector3::Forward,
orientation * Vector3::Forward * flipX,
// Up
orientation * Vector3::Up
orientation * Vector3::Up * flipX
};
alListenerfv(AL_ORIENTATION, (float*)alOrientation);