Understand the Physics Pose and Physics Area components you use to build 2D physics objects.
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.
A physics GameObject in 2D Physics Core needs the following components:
A Physics Pose component sets the following:
A Physics Pose component doesn’t have a physical shape.
Poses store a PhysicsBody object, so some 2D Physics Core properties in components refer to the underlying body.
A Physics Area component sets the shape of a GameObject for physics calculations and collisions.
An Area component also sets which other shapes it can collide with, and its surface properties such as friction and bounciness.
Areas store a PhysicsShape object, so some 2D Physics Core properties in components refer to the underlying shape.
2D Physics Core provides nine types of Physics Area component.
| Physics Area component | Shape |
|---|---|
| Physics Area Capsule | A capsule formed by a central line and a radius. |
| Physics Area Circle | A circle with a center and a radius. |
| Physics Area Composite | A compound shape that combines other shapes. For more information, refer to Combine Physics Core 2D API shapes. |
| Physics Area Contour | A set of points that form a closed shape. Concave sections are allowed. |
| Physics Area Path | A set of points that form a barrier. |
| Physics Area Polygon | A set of points that form a closed shape. Concave sections aren’t allowed. |
| Physics Area Primitive | Lets you select between a circle, capsule, polygon, segment, or chain segment. |
| Physics Area Segment | Two points that form a line. |
| Physics Area Sprite | The physics outline of a sprite. |
You can add multiple areas to a GameObject. For example, add one area for the solid part of a character, then a second, larger area as a trigger zone that detects when something enters it.