forked from teamnwah/openmw-tes3coop
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:
parent
a29d1ace2b
commit
7c16630874
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue