AngularVelocity fix

This commit is contained in:
Dander7BD 2014-01-14 11:42:54 +01:00
parent 89ef3b830a
commit 8f630125b4
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ void RigidBody::Update_LeapFrog( Float updateFrameLength )
Float4x4 wMomentOfInertiaTensor = TransformMatrix( rotationMatrix, this->momentOfInertiaTensor ); // RI Float4x4 wMomentOfInertiaTensor = TransformMatrix( rotationMatrix, this->momentOfInertiaTensor ); // RI
// dO = dt * Formula::AngularVelocity( (RI)^-1, avg_H ) = dt * (RI)^-1 * avg_H // dO = dt * Formula::AngularVelocity( (RI)^-1, avg_H ) = dt * (RI)^-1 * avg_H
this->axis += Formula::AngularVelocity( wMomentOfInertiaTensor.GetInverse(), AverageWithDelta(this->momentum_Angular, this->impulse_Angular) ); this->axis += Radian( Formula::AngularVelocity(wMomentOfInertiaTensor.GetInverse(), AverageWithDelta(this->momentum_Angular, this->impulse_Angular)) );
this->rotation = Rotation( this->axis ); this->rotation = Rotation( this->axis );
// update momentums and clear impulse_Linear and impulse_Angular // update momentums and clear impulse_Linear and impulse_Angular