diff --git a/Code/GamePhysics/Implementation/SphericalRigidBody.cpp b/Code/GamePhysics/Implementation/SphericalRigidBody.cpp index baf8d98b..292a2dd2 100644 --- a/Code/GamePhysics/Implementation/SphericalRigidBody.cpp +++ b/Code/GamePhysics/Implementation/SphericalRigidBody.cpp @@ -21,7 +21,7 @@ SphericalRigidBody::SphericalRigidBody( const API::SphericalBodyDescription &des { this->rigid = RigidBody( Box( desc.rotation, desc.centerPosition, Float3(2.0f * desc.radius) ), desc.mass, - desc.inertiaTensor ); + MomentOfInertia::CreateSphereMatrix( desc.mass, desc.radius ) ); this->gravityNormal = Float3::null; if( desc.subscription ) diff --git a/Code/GamePhysics/PhysicsAPI.h b/Code/GamePhysics/PhysicsAPI.h index dd36a9ee..6cba993c 100644 --- a/Code/GamePhysics/PhysicsAPI.h +++ b/Code/GamePhysics/PhysicsAPI.h @@ -415,7 +415,6 @@ namespace Oyster ::Oyster::Math::Float3 centerPosition; ::Oyster::Math::Float radius; ::Oyster::Math::Float mass; - ::Oyster::Math::Float4x4 inertiaTensor; ICustomBody::EventAction_Collision subscription; bool ignoreGravity; @@ -425,7 +424,6 @@ namespace Oyster this->centerPosition = ::Oyster::Math::Float3::null; this->radius = 0.5f; this->mass = 10.0f; - this->inertiaTensor = ::Oyster::Math::Float4x4::identity; this->subscription = NULL; this->ignoreGravity = false; }