Topic was automatically imported from the old Question2Answer platform.

Asked By

Blockmaster27

Assuming that global_transform.origin is a RigidBody’s static center of mass, how could one find a new center of mass with other objects combined?

Example:

Rigid Body 1 has a mass of 2 and a local origin of Vector3(0, 0, 0) Rigid Body 2 has a mass of 1 and a local origin of Vector3(0, 0, 1) Rigid Body 3 has a mass of 12 and a local origin of Vector3(0, 0, -4)

How would you find the weighted centerpoint of these three objects?

This will give the combined center of mass of these three objects. Just keep adding for more objects. The equation can be simplified to such: (Vector3 * Mass + Vector3 * Mass) / Total Mass