Changeset 9568

Show
Ignore:
Timestamp:
01/28/09 12:16:29 (6 years ago)
Author:
robert
Message:

From Lionel Lagarde, removed accounting of local to world transform on the force vector as the particle velocity should already been in world coords. Fixing this addresses a bug where particles accelerated out of the scene rather than slowing down.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgParticle/FluidFrictionOperator.cpp

    r4121 r9568  
    3737     
    3838    osg::Vec3 Fr(-R * v.x(), -R * v.y(), -R * v.z()); 
    39  
     39     
     40#if 0 
     41    // Commenting out rotation of force vector rotation from local to world as the particle velocity itself 
     42    // should already be in world coords so shouldn't need rotating. 
    4043    if (_current_program->getReferenceFrame() == ModularProgram::RELATIVE_RF) { 
    4144        Fr = _current_program->rotateLocalToWorld(Fr); 
    4245    } 
     46#endif 
    4347 
    4448    // correct unwanted velocity increments