Hi,
I am trying to simulate air resistance in Ode. But im having a bit of trouble doing it in a proper way that doesn’t affect alot of gravity stuff:
if (airResistance < 1) {
javax.vecmath.Vector3f velocity = bod.getLinearVel();
javax.vecmath.Vector3f angVeloc = bod.getAngularVel();
velocity.x *= airResistance;
velocity.y *= airResistance;
velocity.z *= airResistance;
angVeloc.x *= airResistance;
angVeloc.y *= airResistance;
angVeloc.z *= airResistance;
bod.setLinearVel(velocity);
bod.setAngularVel(angVeloc);
}
Seems a hack to me, and not the way i should be doing things…
Any ideas?