---
title: Add 2D physics to objects
product: Unity Spark
canonical: https://docs.unity.com/en-us/unity-spark/create/build/2d/physics-2d
last_updated: 2026-12-01
generated_at: 2026-12-01T21:09:27.751Z
locale: en-us
---

# Add 2D physics to objects

> Make 2D objects fall, collide, and detect triggers with Rigidbody2D and 2D collider components.

Physics makes objects in your game behave like real things. They fall, land on the ground, and bump into each other. Add 2D physics to an object so that it falls, collides with other objects, or detects when something touches it.

## Choose components for 2D physics

The following [components](/unity-spark/create/build/components/about-components.md) control physics:

* A Rigidbody2D component makes an object move with physics. Gravity pulls it down, and other objects can push it.
* A collider is an invisible shape around the object. Physics uses it to tell when two objects touch. A collider doesn't need to match the sprite exactly. For example, a box around a character is usually enough.

An object needs a collider to bump into anything. It needs a Rigidbody2D component only if physics moves it. The following table shows common setups.

| **Object**                                            | **Components**                                                             |
| :---------------------------------------------------- | :------------------------------------------------------------------------- |
| A player or an enemy that falls and jumps             | A **Rigidbody2D** with **Body Type** set to **Dynamic**, and a collider.   |
| The ground, walls, and platforms that never move      | A collider only.                                                           |
| A moving platform that a script moves                 | A **Rigidbody2D** with **Body Type** set to **Kinematic**, and a collider. |
| A coin or a checkpoint that the player passes through | A collider with **Is Trigger** enabled.                                    |

2D physics and 3D physics don't interact, so use only 2D bodies and colliders in a 2D game.

To set up physics, ask the [AI assistant](/unity-spark/create/assistant/about-assistant.md), for example, `Make the player fall and land on the platforms.`

## Add a 2D physics component

To add 2D physics to an object:

1. Select the object in the [Hierarchy window](/unity-spark/create/build/objects-prefabs/hierarchy-window-reference.md).
2. In the [Inspector window](/unity-spark/create/build/components/inspector-window-reference.md), select **Add Component**.
3. Expand **Physics 2D** to list the 2D physics components you can add.
4. Select the component to add:
   * Add a **Rigidbody2D** component to use physics to move the object.
   * Add a collider, such as **BoxCollider2D** or **CircleCollider2D**, to give the object a shape.

## Make a trigger

A trigger is a collider that detects other objects without blocking them. Use a trigger for things the player passes through, such as a coin to collect or a finish line.

To make an object a trigger, enable **Is Trigger** on its collider.

## Keep a player upright

Without a limit, physics can tip a character over when it bumps into a corner.

To stop a player from falling over, enable **Z** next to **Freeze Rotation** under **Constraints** in the **Rigidbody2D** component.

## Additional resources

* [2D objects and components reference](/unity-spark/create/build/2d/2d-reference.md)
* [Add and edit sprites](/unity-spark/create/build/2d/sprites.md)
* [Paint levels with tilemaps](/unity-spark/create/build/2d/tilemaps.md)
* [Components, tags, and layers](/unity-spark/create/build/components.md)
