Table of Contents
A curve asset is an easing you draw yourself. Wherever the editor offers a built-in ease — the
Easing of an animation key, of a Lerp node and of a Set sound FX parameters node — it also
offers Curve, and then
the value runs along your drawing instead: overshoot and settle twice, hesitate in the middle,
anything that has one value for every moment.
Making one. + → Curve creates the asset; it stands in the assets panel under Curves. A
double click on its row opens the Curve tab. A new curve is a straight line from (0, 0) to
(1, 1), so a key or a Lerp that picks it moves exactly as it did before, until you bend it.
What a curve is
A graph: t runs to the right, from 0 (the start of the way) to 1 (its end), and v runs up,
how far along the way the value is at that moment. 0 is the value the key starts from (or a of the
Lerp), 1 the one it goes to (b). v may go above 1 or below 0 — that is what makes a value shoot
past its target and come back.
The curve is a chain of points, joined the way Vector art joins them: a segment is straight until one of its two points has a handle on that side, and one handle is enough for a bend. Three rules keep it a curve a value can follow:
- The first point sits at t = 0 and the last at t = 1. They move only up and down and cannot be taken away.
- Points never overtake each other in t. A point dragged past its neighbour stops at it.
- A handle never reaches past the next point in t, and never points backwards. One that would is shortened along its own direction, so a smooth point stays smooth; one pointing backwards is turned upright. Without this the curve could run backwards and have two values at one moment.
These rules hold for everything written into a curve — a drag, a preset, a hand-edited project file.
The Curve tab
The graph fills the tab, with lines at 0 and 1 in both directions.
- Double-click the line to put a point there. The curve keeps its shape: a bend is split in two, not flattened.
- Double-click free space between the two ends to put a plain point there, at that t and that v.
- The new point is picked and stays where it was put; press it again to drag it. A single click beside the points adds nothing, it only drops the pick.
- Click a point to pick it — it is drawn filled. Drag a point or a handle; each drag is one undo step.
- Delete (or Backspace) takes the picked point away. So does Delete point in the menu a right-click on a point opens; the same menu sets the point's type. An end cannot go, its entry is greyed out.
- Alt-click a point to make it round, or straight again.
- Point: … in the header sets the picked point's type, as in the Vector art tab: Straight (no handles), Corner (handles move on their own), Smooth (handles stay in line), Symmetric (in line and of one length).
- t and v in the header show the picked point's place; type a number or drag sideways on the field to move it there. The same rules hold as for a drag, and each change is one undo step. An end's t field is off, because the ends stay at 0 and 1.
- The magnet in the header snaps points and handles to a grid of 0.05 in t and v while it is on: a point put on free space, a dragged point and a dragged handle. A point put on the line keeps its place on the line until you drag it.
- Preset starts the curve over from one of the built-in eases — Sine, Quad, Cubic, Quart, Quint, Expo, Circ, Back, Elastic, Bounce, each in, out and in-out, and Linear. The menu has a search box. Each preset is traced by a handful of points that stay within 0.4 % of the ease, a quad by two, a bounce by twenty, and is yours to bend from there.
- The preview is a dot on the curve, with a twin on a rail right of the graph that only moves up and down: the motion the curve gives a value. A playhead runs through the dot, with a knob under the graph. The preview stands still at first; Preview runs it once a second, and pressed again holds it. Drag the knob sideways to put the preview at any t. Drag the twin up or down to jump to the first t at which the curve reaches that height; a height the curve never reaches takes the t where it comes closest.
- Fit frames the curve again, handles included. A middle drag or a Shift drag pans, the wheel zooms.
The line on screen is drawn from the same function the animation player and the Lerp node use, so
what the tab shows is what runs.
Using a curve
- On an animation key, set Easing to Curve. A Curve row appears below it; the first curve of the project is picked for you, change it there. See Animations.
- On a
Lerpnode, set Ease to Curve and pick the curve in the Curve row.tis still held to 0…1, but the result follows the curve pastbwhere it overshoots. See Behaviors.
A key or a Lerp whose curve is gone — deleted, or none picked yet — blends linearly. The
inspector says so under the key, and the node shows the problem on its title. Deleting a curve that
is in use asks first and says how many keys and Lerp nodes use it.
Stored, a key names its curve as curve:<id> in its interpolation, a Lerp in its curve
setting. The points are stored like the points of a vector art ring, with x for t and y for v and
the handles as offsets from their point.
Using the editor
- Concepts
- Accounts
- Agents (MCP)
- Scenes
- Scene editing
- Behaviors
- Structs
- Colliders
- Physics
- Textures
- Vector art
- Pixel art
- Fonts
- Videos
- Sounds
- Instruments
- Patterns
- Songs
- Animations
- Curves
- Tiles
- Tilemaps
- State machines
- Shaders
- Particles
- Containers
- Compositions
- Keyboard
Working on the code