Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Physics Pose and Physics Area components

Understand the Physics Pose and Physics Area components you use to build a 2D Physics Core object.
Read time 2 minutesLast updated 14 days ago

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, which makes the GameObject a 2D Physics Core object.
  • One or more Physics Area components, which give the GameObject a shape to collide with and display.

Pose

A Physics Pose component sets the following:
  • How and when Unity updates the position and rotation of the GameObject with the result of physics calculations.
  • Which simulation world the GameObject belongs to.
  • Whether the GameObject is fixed in place or responds to forces like gravity.
  • How the GameObject responds to forces.
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.

Area

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 CapsuleA capsule formed by a central line and a radius.
Physics Area CircleA circle with a center and a radius.
Physics Area CompositeA compound shape that combines other shapes. For more information, refer to Combine Physics Core 2D API shapes.
Physics Area ContourA set of points that form a closed shape. Concave sections are allowed.
Physics Area PathA set of points that form a barrier.
Physics Area PolygonA set of points that form a closed shape. Concave sections aren't allowed.
Physics Area PrimitiveLets you select between a circle, capsule, polygon, segment, or chain segment.
Physics Area SegmentTwo points that form a line.
Physics Area SpriteThe 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.

Additional resources