From 8f630125b4ba318699fac37346382478a8b1a295 Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Tue, 14 Jan 2014 11:42:54 +0100 Subject: [PATCH] AngularVelocity fix --- Code/OysterPhysics3D/RigidBody.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/OysterPhysics3D/RigidBody.cpp b/Code/OysterPhysics3D/RigidBody.cpp index 3ae48511..6fef6311 100644 --- a/Code/OysterPhysics3D/RigidBody.cpp +++ b/Code/OysterPhysics3D/RigidBody.cpp @@ -58,7 +58,7 @@ void RigidBody::Update_LeapFrog( Float updateFrameLength ) Float4x4 wMomentOfInertiaTensor = TransformMatrix( rotationMatrix, this->momentOfInertiaTensor ); // RI // 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 ); // update momentums and clear impulse_Linear and impulse_Angular