From 708608177af166f7762643b4d70055cb501432f3 Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Mon, 16 Nov 2015 19:13:28 -0500 Subject: [PATCH] Fix audio listener positionning issue --- src/graphics/camera.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/camera.cpp b/src/graphics/camera.cpp index a900fe39c..facb4bd5e 100644 --- a/src/graphics/camera.cpp +++ b/src/graphics/camera.cpp @@ -526,10 +526,10 @@ void Camera::update(float dt) { if (race_manager->getNumLocalPlayers() < 2) { - Vec3 pos(m_camera->getPosition()); + Vec3 heading(sin(m_kart->getHeading()), 0.0f, cos(m_kart->getHeading())); SFXManager::get()->positionListener(m_kart->getXYZ(), - m_kart->getXYZ() + Vec3(0, 0, 1), - Vec3(0, 1, 0)); + heading, + Vec3(0, 1, 0)); } if (m_kart == NULL) return; // cameras not attached to kart must be positioned manually