bool OverrideMassCenter { get; set; }

robot_2Generated
code_blocksInput

Description

Indicates whether the mass center of this PhysicsBody is calculated automatically or set directly by the user. When set to true, the mass center is overridden and not calculated based on the body's shapes and their distribution.

Usage

Use this property when you need to manually specify the center of mass for a PhysicsBody rather than relying on the automatic calculation based on the body's shapes. This can be useful in scenarios where precise control over the mass distribution is required, such as in custom physics simulations or when dealing with complex shapes.

Example

// Example of setting the OverrideMassCenter property
PhysicsBody body = new PhysicsBody();
body.OverrideMassCenter = true; // Manually override the mass center

// Set the mass center to a specific point
body.LocalMassCenter = new Vector3(0, 0, 0);