Forgot to change the velocity for the emitters as well...

This commit is contained in:
stiffly
2016-01-15 16:10:02 +01:00
parent 63704b2e6b
commit be33dfbd69
+1 -1
View File
@@ -112,7 +112,7 @@ void SoundSystem::updateEmitters(double dt)
// Get next pos
glm::vec3 nextPos = Transform::AbsolutePosition(m_World, it->first);
// Calculate velocity
glm::vec3 velocity = nextPos - previousPos;
glm::vec3 velocity = glm::vec3(nextPos - previousPos) / (float)dt;
setSourcePos(it->second->ALsource, nextPos);
setSourceVel(it->second->ALsource, velocity);
float gain;