mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 07:21:12 +00:00
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
@ -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…
x
Reference in New Issue
Block a user