Forgot to change the velocity for the emitters as well...
This commit is contained in:
@@ -112,7 +112,7 @@ void SoundSystem::updateEmitters(double dt)
|
|||||||
// Get next pos
|
// Get next pos
|
||||||
glm::vec3 nextPos = Transform::AbsolutePosition(m_World, it->first);
|
glm::vec3 nextPos = Transform::AbsolutePosition(m_World, it->first);
|
||||||
// Calculate velocity
|
// Calculate velocity
|
||||||
glm::vec3 velocity = nextPos - previousPos;
|
glm::vec3 velocity = glm::vec3(nextPos - previousPos) / (float)dt;
|
||||||
setSourcePos(it->second->ALsource, nextPos);
|
setSourcePos(it->second->ALsource, nextPos);
|
||||||
setSourceVel(it->second->ALsource, velocity);
|
setSourceVel(it->second->ALsource, velocity);
|
||||||
float gain;
|
float gain;
|
||||||
|
|||||||
Reference in New Issue
Block a user