forked from mirror/openmw-tes3mp
Take sound listener y rotation (roll) into account, though currently unused for actors
This commit is contained in:
parent
0522da257c
commit
3ad0189982
1 changed files with 2 additions and 1 deletions
|
@ -1575,7 +1575,8 @@ namespace MWWorld
|
|||
const OEngine::Physic::PhysicActor *actor = mPhysEngine->getCharacter(getPlayerPtr().getRefData().getHandle());
|
||||
if(actor) playerPos.z += 1.85*actor->getHalfExtents().z;
|
||||
Ogre::Quaternion playerOrient = Ogre::Quaternion(Ogre::Radian(getPlayerPtr().getRefData().getPosition().rot[2]), Ogre::Vector3::NEGATIVE_UNIT_Z) *
|
||||
Ogre::Quaternion(Ogre::Radian(getPlayerPtr().getRefData().getPosition().rot[0]), Ogre::Vector3::NEGATIVE_UNIT_X);
|
||||
Ogre::Quaternion(Ogre::Radian(getPlayerPtr().getRefData().getPosition().rot[0]), Ogre::Vector3::NEGATIVE_UNIT_X) *
|
||||
Ogre::Quaternion(Ogre::Radian(getPlayerPtr().getRefData().getPosition().rot[1]), Ogre::Vector3::NEGATIVE_UNIT_Y);
|
||||
MWBase::Environment::get().getSoundManager()->setListenerPosDir(playerPos, playerOrient.yAxis(),
|
||||
playerOrient.zAxis());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue