From: Cutis L. Olson Date: Fri, 23 Jul 2010 14:01:49 +0000 (-0500) Subject: Add a method to set particle wind using from heading (deg) and speed (kt) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c5ec6927b38bc29febd2811a743d3916aa7836b3;p=simgear.git Add a method to set particle wind using from heading (deg) and speed (kt) --- diff --git a/simgear/scene/model/particles.cxx b/simgear/scene/model/particles.cxx index 08037900..acac7dfc 100644 --- a/simgear/scene/model/particles.cxx +++ b/simgear/scene/model/particles.cxx @@ -62,11 +62,13 @@ void GlobalParticleCallback::operator()(osg::Node* node, osg::NodeVisitor* nv) osg::Matrix om(toOsg(q)); osg::Vec3 v(0,0,9.81); gravity = om.preMult(v); + // NOTE: THIS WIND COMPUTATION DOESN'T SEEM TO AFFECT PARTICLES const osg::Vec3& zUpWind = Particles::getWindVector(); - osg::Vec3 w(zUpWind.y(), zUpWind.x(), - zUpWind.z()); + osg::Vec3 w(zUpWind.y(), zUpWind.x(), -zUpWind.z()); wind = om.preMult(w); - //SG_LOG(SG_GENERAL, SG_ALERT, "wind vector:"<