---
title: Edit Animation curves
product: Unity Editor
version: '6000.6'
latest_version: '7000.0'
status: This page documents version 6000.6. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.6/manual/animation-section/animation-mecanim/animation-clips/animation-editor-guide/editing-curves
latest_url: https://docs.unity.com/en-us/engine/7000.0/manual/animation-section/animation-mecanim/animation-clips/animation-editor-guide/editing-curves.md
last_updated: 2026-09-26
generated_at: 2026-11-07T07:39:43.715Z
locale: en-us
---

# Edit Animation curves

> Add, move, and edit keys in the Curve Editor.

There are several different features and windows in the Unity Editor which use **Curves** to display and edit data. The methods you can use to view and manipulate curves is largely the same across all these areas, although there are some exceptions.

* The [Animation Window](/engine/6000.6/manual/animation-section/animation-mecanim/animation-clips/animation-editor-guide.md) uses curves to display and edit the values of animated properties over time in an Editor.


  **The Animation Window.:**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationEditorCurve.png)

* Script components can have member variables of type [Animation Curve](/engine/6000.6/manual/working-with-gameobjects/unity-components/inspector-manage-components/inspector-curves.md) that can be used for all kinds of things. Click these variables in the Editor to open the **Curve Editor**.


  **The Curve Editor.:**
  ![](/api/media?file=/engine/6000.6/media/images/CurveEditorPopup.png)

* The [Audio Source](/engine/6000.6/manual/audio/reference/class-audio-source.md) component uses curves to control roll-off and other properties as a function of distance to the Audio Source.


  **Distance function curves in the AudioSource component in the Inspector.:**
  ![](/api/media?file=/engine/6000.6/media/images/AudioSourceCurve.png)

* The [Particle System](/engine/6000.6/manual/visual-effects/particle-systems/part-sys-usage.md) uses curves to vary particle properties over time.


  **Particle System curves editor.:**
  ![](/api/media?file=/engine/6000.6/media/images/ParticleSystemCurve.png)

While these controls have subtle differences, the **curves** can be edited in exactly the same way in all of them. This page explains how to navigate and edit curves in those controls.

## Add and Move Keys on a Curve

You can add a key a curve by double-clicking on the curve at the point where you want to add the **key**. You can also right-click on a curve and selecting **Add Key** from the context menu. Once added, a **key** can be moved with the mouse:

* Click a **key** to select it. Drag the selected **key** with the mouse.
* To snap the **key** to the grid while dragging it around, hold down **Command** on Mac / **Control** on Windows while dragging.

It is also possible to select multiple **keys** at once:

* To select multiple **keys** at once, hold down **Shift** while clicking the keys.
* To deselect a selected **key**, click on it again while holding down **Ctrl**.
* To select all **keys** within a rectangular area, click on an empty spot and drag to form the rectangle selection.
* The rectangle selection can also be added to existing selected keys by holding down **Shift**.

**Keys** can be deleted by selecting them and pressing **Delete**, or by right-clicking on them and selecting **Delete Key** from the context menu.

## Edit Keys

Use **Enter/Return** or context menu to start editing selected keys, **Tab** to switch between fields, **Enter/Return** to commit, and **Escape** to cancel editing.

## Navigating the Curve View

When working with the **Animation View** you can easily zoom in on details of the curves you want to work with or zoom out to get the full picture. You can always press **F** to frame-select the shown curves or selected keys in their entirely.

### Zooming

You can **zoom** the Curve View using the scroll-wheel of your mouse, the zoom functionality of your trackpad, or by holding **Alt** while right-dragging with your mouse. You can zoom on only the horizontal or vertical axis:

* **zoom** while holding down **Command** on Mac / **Control** on Windows to zoom horizontally.
* **zoom** while holding down **Shift** to zoom vertically.

Furthermore, you can drag the end caps of the scrollbars to shrink or expand the area shown in the Curve View.

### Panning

You can **pan** the Curve View by middle-dragging with your mouse or by holding **Alt** while left-dragging with your mouse.

## Editing Tangents

A key has two **tangents**: one on the left for the incoming slope and one on the right for the outgoing slope. The tangents control the shape of the curve between the keys. You can select from a number of different tangent types to control how your curve leaves one key and arrives at the next key. Right-click a key to select the tangent type for that key.


**Tangent mode menu.:**
![](/api/media?file=/engine/6000.6/media/images/AnimationCurveTangentMenu.png)

For animated values to change smoothly when passing a key, the left and right tangent must be co-linear. The following tangent types ensure smoothness:

* **Clamped Auto**: This is the default tangent mode. The tangents are automatically set to make the curve pass smoothly through the key. When editing the key's position or time, the tangent adjusts to prevent the curve from "overshooting" the target value. If you manually adjust the tangents of a key in Clamped Auto mode, it is switched to **Free Smooth** mode. In the example below, the tangent automatically goes into a slope and levels out while the key is being moved:


  **Clamped Auto mode levels the tangents as you move the key.:**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationClampedAutoTangents.gif)

* **Auto**: This is a Legacy tangent mode, and remains an option to be backward compatible with older projects. Unless you have a specific reason to use this mode, use the default **Clamped Auto**. When a key is set to this mode, the tangents are automatically set to make the curve pass smoothly through the key. However, there are two differences compared with **Clamped Auto** mode:

  * The tangents do not adjust automatically when the key's position or time is edited; they only adjust when initially setting the key to this mode.
  * When Unity calculates the tangent, it does not take into account avoiding "overshoot" of the target value of the key.


  **Auto mode levels the tangents when you select the mode.:**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationAuto.png)

* **Free Smooth**: Drag the tangent handles to freely set the tangents. They are locked to be co-linear to ensure smoothness.


  **Free Smooth mode locks tangents as co-linear.:**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationFreeSmooth.png)

* **Flat**: The tangents are set to be horizontal (this is a special case of **Free Smooth**).


  **Flat mode flattens the tangents horizontally.:**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationFlat.png)

Sometimes you might not want the curve to be smooth when passing through a key. To create sharp changes in the curve, choose one of the **Broken** tangent modes. When using broken tangents, the left and right tangent can be set individually. Each of the left and right tangents can be set to one of the following types:

* **Broken - Free**: Drag the tangent handle to freely set the tangents.


  **Free mode sets tangent handles individually. :**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationBrokenFree.png)

* **Broken - Linear**: The tangent points towards the neighboring key. To make a linear curve segment, set the tangents at both ends to be **Linear**. In the example below, all three keys have been set to **Broken - Linear**, to achieve straight lines from key to key.


  **Linear mode draws straight lines for each tangent.:**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationBrokenLinear.png)

* **Broken - Constant**: The curve retains a constant value between two keys. The value of the left key determines the value of the curve segment.


  **Constant mode keeps a constant value between each key.:**
  ![](/api/media?file=/engine/6000.6/media/images/AnimationBrokenConstant.png)

## Additional resources

* [Use curves in the Inspector window](/engine/6000.6/manual/working-with-gameobjects/unity-components/inspector-manage-components/inspector-curves.md)
* [Fix broken animation field paths with YAML](/engine/6000.6/manual/working-with-scenes/text-scene-format/yaml-fix-broken-animation-paths.md)
