1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 09:53:52 +00:00

Fix particle direction

This commit is contained in:
Chris Robinson 2013-04-13 18:22:30 -07:00
parent 0b363ba36e
commit 254c6840d8

View file

@ -148,10 +148,10 @@ public:
genEmissionColour(particle->colour);
// NOTE: We do not use mDirection/mAngle for the initial direction.
Ogre::Radian vdir = mVerticalDir + mVerticalAngle*Ogre::Math::SymmetricRandom();
Ogre::Radian hdir = mHorizontalDir + mHorizontalAngle*Ogre::Math::SymmetricRandom();
particle->direction = (Ogre::Quaternion(vdir, Ogre::Vector3::UNIT_X) *
Ogre::Quaternion(hdir, Ogre::Vector3::UNIT_Z)) *
Ogre::Radian vdir = mVerticalDir + mVerticalAngle*Ogre::Math::SymmetricRandom();
particle->direction = (Ogre::Quaternion(hdir, Ogre::Vector3::UNIT_Z) *
Ogre::Quaternion(vdir, Ogre::Vector3::UNIT_X)) *
Ogre::Vector3::UNIT_Z;
genEmissionVelocity(particle->direction);