NifOsg::Emitter: ignore psToWorld scale

Seems wrong to me, but MW appears to do it that way. Without this fix, the light_de_candle_08_64 from http://www.nexusmods.com/morrowind/mods/41654/ has flame particles in the wrong spot.
This commit is contained in:
scrawl 2015-11-13 00:21:30 +01:00
parent a29d1ace2b
commit 7c16630874

View file

@ -264,7 +264,9 @@ void Emitter::emitParticles(double dt)
osg::MatrixList worldMats = getParticleSystem()->getWorldMatrices(); osg::MatrixList worldMats = getParticleSystem()->getWorldMatrices();
if (!worldMats.empty()) if (!worldMats.empty())
{ {
const osg::Matrix psToWorld = worldMats[0]; osg::Matrix psToWorld = worldMats[0];
// ignore scales in particlesystem world matrix. this seems wrong, but have to do so for MW compatibility.
psToWorld.orthoNormalize(psToWorld);
worldToPs = osg::Matrix::inverse(psToWorld); worldToPs = osg::Matrix::inverse(psToWorld);
} }