To add physics to a GameObject, add a Physics Pose component to make the GameObject part of the 2D physics simulation, and one or more Physics Area components, which give it a shape.
Note: This documentation is about using Pose, Area, and Constraint components. To use 2D physics in the Unity Editor using components like the Rigidbody 2D component, refer to 2D physics instead.
To create a physics object, follow these steps:
Note: By default, a physics object is static and isn’t affected by physics. To make it dynamic, in the Physics Pose component, set Body Type to Dynamic.
To move the GameObject, use the Transform component of the GameObject. Changing an object’s position doesn’t change its center of mass. Unity calculates the center of mass from the mass of the shapes attached to the object.
For the full list of Physics Area components and the shapes they create, refer to Physics Pose and Physics Area components.
To configure physics properties, such as shape, mass, and collision behavior, adjust the properties in the Inspector window. For more information, refer to Physics Pose component reference and the component reference page for the Area component you’re using, such as Physics Area Circle component reference.
To share the same properties across multiple GameObjects, create a definition asset. For more information, refer to Share properties across multiple 2D Physics Core components.