- Home /
Calculate the centerOfMass
How can i let the Physicengine calculate the centerOfMass again,when i change the position of some collider in the rigidbody?
Answer by Jaap Kreijkamp · Sep 17, 2010 at 01:47 AM
You could try to remove and add the collider through AddComponent as adding components should trigger the recalculation.
Answer by Alexey Elyakov · Sep 17, 2010 at 02:56 AM
(mCenter1 mMass1 + mCenter2 mMass2 + ... + mCentern * mMassn) / (mMass1 + ... + mMassn ),
where
mCenteri - Vector3, variable "center" of Collider,
mMassi - mass.
Your answer
![](https://koobas.hobune.stream/wayback/20220613073347im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem with Rigidbody.CenterOfMass 2 Answers
How can I rotate around with a Rigidbody while respecting physics? 0 Answers
AddRelativeTorque() Applied Incorrectly When Using a Custom Centre of Gravity 0 Answers
Recalculate the worldCenterOfMass? 0 Answers
AddRelativeTorque results in incorrect angular acceleration (Maybe centrifugal force affects) 0 Answers