Legacy Documentation: Version 2017.2 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Rigidbody.ResetCenterOfMass

Switch to Manual
public void ResetCenterOfMass();

Description

Reset the center of mass of the rigidbody.

Computes the actual center of mass of the rigidbody from all the colliders attached, and stores it. After calling this function, the center of mass will get updated automatically after any modification to the rigidbody.

Did you find this page useful? Please give it a rating: