16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 17:59:18 +02:00

cabin sound positioning

This commit is contained in:
milek7
2017-09-16 20:35:43 +02:00
parent 6c8290f66f
commit e5ad6be865
10 changed files with 88 additions and 37 deletions

View File

@@ -1060,10 +1060,7 @@ bool TWorld::Update()
Camera.SetMatrix(cam_matrix);
glm::vec3 pos(Camera.Pos.x, Camera.Pos.y, Camera.Pos.z);
glm::vec3 at = glm::vec3(0.0, 0.0, -1.0) * glm::mat3(cam_matrix);
glm::vec3 up = glm::vec3(0.0, 1.0, 0.0) * glm::mat3(cam_matrix);
sound_man->set_listener(pos, at, up);
sound_man->set_listener(pos, glm::mat3(cam_matrix));
sound_man->update(dt);
}