From a70e27e98f657d3e50a58287522f1551bc5a93df Mon Sep 17 00:00:00 2001 From: Felix Winterhalter <felix.winterhalter@fau.de> Date: Tue, 20 Feb 2018 22:34:13 +0100 Subject: [PATCH] calcInertia of Sphere is called with the wrong argument order. The sphere moment of inertia is completely wrong. --- src/pe/rigidbody/Sphere.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pe/rigidbody/Sphere.cpp b/src/pe/rigidbody/Sphere.cpp index f4314e9ba..2d45389cb 100644 --- a/src/pe/rigidbody/Sphere.cpp +++ b/src/pe/rigidbody/Sphere.cpp @@ -90,7 +90,7 @@ Sphere::Sphere( id_t const typeId, id_t sid, id_t uid, const Vec3& gpos, const V } else { auto mass = calcMass( radius, Material::getDensity( material ) ); - setMassAndInertia( mass, calcInertia( radius, mass ) ); + setMassAndInertia( mass, calcInertia( mass, radius ) ); } setCommunicating( communicating ); setFinite( true ); -- GitLab