added direction to listener for sound spatialization

This commit is contained in:
Lendemor 2017-09-04 20:15:07 +02:00
parent 73010a52e1
commit aaee7d6762

View File

@ -300,6 +300,8 @@ void PlayerCharacterNode::update()
m_playerLightNode->update();
glm::vec3 p = this->getEyePosition();
sf::Listener::setPosition(p.x,p.y,p.z);
glm::vec3 d = getDirection();
sf::Listener::setDirection(d.x,d.y,d.z);
}
void PlayerCharacterNode::toggleNoClip()