Combine or connect shapes, and enable and detect contact between physics objects using the LowLevelPhysics2D API.
Note: This documentation is about writing C# scripts using the LowLevelPhysics2D API. To use 2D physics in the Unity Editor using components like the Rigidbody 2D component, refer to 2D physics instead.
| Topic | Description |
|---|---|
| Introduction to collision in the LowLevelPhysics2D API | Learn about collisions between 2D physics objects, including collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info See in Glossary types, layers, and layer masksA value defining which layers to include or exclude from an operation, such as rendering, collision or your own code. More info See in Glossary. |
| Configure collisions between objects | Change which objects collide with which using layers and masks, and enable using 64 layers instead of 32. |
| Detect collisions between objects | To detect when collisions occur and respond to them, use collision callback methods or event methods. |
| Check LowLevelPhysics2D API intersections | To check whether 2D physics objects overlap or will collide, also known as intersections, use query methods. |