# Physics 2D
**Target:** Unity **6000.5+** (component-based 2D physics: `Rigidbody2D`, `Collider2D`, `Physics2D`). Companion to [[Physics 3D]] - read that hub first if you want the PhysX side; this series calls out every place where 2D behaves differently.
> [!note] Verification status
> APIs below were checked on 2026-11-07 against the Unity **6000.5** Scripting Reference and Manual (links in each part). The docs site banners several 6000.5 pages as **Legacy** and lists newer versions (6000.6 / 6000.7 / 7000.0); behaviour notes here are for 6000.5. The `LowLevelPhysics2D` API is documented as **new in Unity 6.3** (6000.3). **None of the code in this series has been compiled or play-tested in the Unity Editor.**
## Why a separate 2D series?
2D physics in Unity is a *different engine* from 3D. `Rigidbody2D` and `Collider2D` live in `UnityEngine.Physics2DModule` and never interact with `Rigidbody` / `Collider` (PhysX). Different layer matrix (Project Settings > Physics 2D), different queries (`Physics2D.*`), different callbacks (`OnCollisionEnter2D`), and some tools 3D doesn't have at all: **Effectors**, **Composite colliders**, and `Rigidbody2D.Slide` for kinematic characters.
## Parts
| # | Note | Covers |
|---|---|---|
| 1 | [[1. Physics 2D Rigidbody2D and Body Types]] | Dynamic / Kinematic / Static, `simulated`, interpolation, collision detection, gravity scale, `linearVelocityX/Y`, AddForceX/Y |
| 2 | [[2. Physics 2D Colliders Composite and Materials]] | Box / Circle / Capsule / Polygon / Edge / Custom, Composite Collider 2D and `compositeOperation`, Tilemap colliders, `PhysicsMaterial2D` |
| 3 | [[3. Physics 2D Queries ContactFilter2D and Layers]] | Layer matrix, `ContactFilter2D`, allocation-free Raycast / Overlap / Cast, triggers vs collisions, `queriesStartInColliders` |
| 4 | [[4. Physics 2D Effectors and Joints]] | Platform (one-way), Surface (conveyor), Area (wind), Point (magnet), Buoyancy (water); Hinge/Distance/Spring/Wheel joints |
| 5 | [[5. Physics 2D Kinematic Platformer with Slide]] | Worked example: Kinematic `Rigidbody2D.Slide` controller with coyote time, jump buffer, one-way platforms and a metrics block |
| 6 | [[6. Physics 2D Pitfalls and LowLevelPhysics2D]] | Mixing 2D/3D, scale, Z depth, sleeping, simulation mode, and when to look at the Box2D v3 `LowLevelPhysics2D` API |
## 2D vs 3D at a glance
| Concept | 3D ([[Physics 3D]]) | 2D (this series) |
|---|---|---|
| Body | `Rigidbody` (isKinematic bool) | `Rigidbody2D` with `bodyType` enum (Dynamic / Kinematic / Static) |
| Velocity | `Rigidbody.linearVelocity` | `Rigidbody2D.linearVelocity`, plus `linearVelocityX` / `linearVelocityY` |
| Kinematic character helper | `CharacterController` (see [[Character Controllers]]) | `Rigidbody2D.Slide` |
| Query filtering | `LayerMask` + `QueryTriggerInteraction` | `ContactFilter2D` (layers, triggers, depth, normal angle) |
| Merging static colliders | none built-in | `CompositeCollider2D` |
| Force zones | write your own | Effector 2D components |
| Callbacks | `OnCollisionEnter(Collision)` | `OnCollisionEnter2D(Collision2D)` |
## Level Up! tie-ins
- **Gameplay metrics (Level 5):** in 2D the jump arc *is* the level grid. Part 5 builds a metrics block and Part 2's composite tilemap colliders let you gray-box gaps at 80/100/120% of jump distance, exactly the classroom exercise in [[Level Up! (Review)]].
- **"If it looks like the player can go there, then they should be able to" (Level 9, Gray Matters):** one-way platforms (Part 4) and composite outlines (Part 2) are how you keep visual and collision geometry honest.
- **Hazards and rhythm (Level 12):** surface/area effectors are cheap conveyor and wind hazards you can put on a beat with [[Timeline Basics]].
## Related (existing)
- [[Physics 3D]] - PhysX counterpart; especially [[3. Layers Matrix and Queries]] and [[7. Physics Pitfalls]]
- [[Tilemaps and Tilesets]] - Tilemap Collider 2D + Composite outlines for 2D levels
- [[Character Controllers]] - the 3D controller comparison and metrics gym (2D version is Part 5 here)
- [[05 - 2D Platformer Movement]] - the Input System starter kit's platformer; compare its movement approach with Part 5's Kinematic `Slide` one
- [[Unity 6 Pong]] / [[Space Invaders]] - simple 2D physics games to retrofit with ContactFilter2D queries
- [[Unity 2D Point-and-Click System]] - `Physics2D.OverlapPoint` style picking
- [[Input System]] - InputActionReference wiring used in the scripts
- [[Enemy AI State Machine]] / [[Organic Enemy Sensing]] - 2D line-of-sight with `Physics2D.Raycast` + ContactFilter2D
- [[Game Programming Patterns (Review)]] - Update Method / Game Loop (fixed timestep), Component
- [[Level Up! (Review)]] - metrics, gray-boxing, hazards
## Official docs (hub index)
- 2D physics (Manual, 6000.5): https://docs.unity.com/en-us/engine/6000.5/manual/unity2d/2d-physics
- Rigidbody 2D (Manual): https://docs.unity.com/en-us/engine/6000.5/manual/unity2d/2d-physics/rigidbody-2d
- Collider 2D (Manual): https://docs.unity.com/en-us/engine/6000.5/manual/unity2d/2d-physics/collider-2d
- Effectors 2D (Manual): https://docs.unity.com/en-us/engine/6000.5/manual/unity2d/2d-physics/effectors-2d
- 2D joints (Manual): https://docs.unity.com/en-us/engine/6000.5/manual/unity2d/2d-physics/2d-joints
- Physics 2D settings: https://docs.unity.com/en-us/engine/6000.5/manual/unity-editor/editor-settings-reference/comp-manager-group/class-physics2dsettings
- `Rigidbody2D` API: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/Rigidbody2D.html
- `Physics2D` API: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/Physics2D.html
- `ContactFilter2D` API: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/ContactFilter2D.html
- `Rigidbody2D.Slide` API: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/Rigidbody2D.Slide.html
- LowLevelPhysics2D (new in 6.3): https://docs.unity.com/en-us/engine/6000.3/manual/whats-new/unity63