diff --git a/components/nifosg/particle.cpp b/components/nifosg/particle.cpp index afa76468a..c6e5fa9a8 100644 --- a/components/nifosg/particle.cpp +++ b/components/nifosg/particle.cpp @@ -176,7 +176,7 @@ void GravityAffector::beginOperate(osgParticle::Program* program) { bool absolute = (program->getReferenceFrame() == osgParticle::ParticleProcessor::ABSOLUTE_RF); if (mType == Type_Wind) - mCachedWorldPositionDirection = absolute ? osg::Matrix::transform3x3(program->getLocalToWorldMatrix(), mDirection) : mDirection; + mCachedWorldPositionDirection = absolute ? program->rotateLocalToWorld(mDirection) : mDirection; else // Type_Point mCachedWorldPositionDirection = absolute ? program->transformLocalToWorld(mPosition) : mPosition; }