Version: Unity 6.7 Beta (6000.7)
Language : English
Creating a scene with 2D Physics Core
Add physics to a GameObject with 2D Physics Core

Physics Pose and Physics Area components

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 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.

Additional resources

Creating a scene with 2D Physics Core
Add physics to a GameObject with 2D Physics Core