Hello,

I think that I found a problem on osgParticle::FluidFrictionOperator::operate(Particle* P, double dt),
I suppose that the current modular program is in relative reference frame.

The method compute a force (Fr) from velocity of the particle which is in local space

The force is then converted in world space

if (_current_program->getReferenceFrame() == ModularProgram::RELATIVE_RF) {
     Fr = _current_program->rotateLocalToWorld(Fr);
 }

Then delta velocity computed in world space is added to the particle velocity which is on local space

  // correct unwanted velocity increments
  osg::Vec3 dv = Fr * P->getMassInv() * dt;
  float dvl = dv.length();
  if (dvl > vm) {
      dv *= vm / dvl;
  }

  P->addVelocity(dv);

I think that there is a problem.

Can someone tell me if I wrong or not?

Thank you.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to