Link one object's property to another
Make a shape follow, match, or track another object every frame.
Keyframes are great when you know in advance what a value should be at a given time. Sometimes you don't — you want one object to always sit next to another, or always match its opacity, no matter how the source object ends up moving. That's what a variable link (a "binding") does: it drives one property on an object from another object's value, recomputed every frame, for as long as the project plays.
Setting one up
- Select the object you want to drive — the one whose property should follow something else.
- Open the Inspector's Anim tab and scroll to Link variables (live updater).
- Pick what you want to control: Follow (the whole object tracks another object's position), X, Y, Opacity, Stroke width, or (for a counter) Value. Each choice is a small card showing what it does.
- For anything other than Follow, also pick which of the source object's values to read: its x, y, width, height, length (a live measurement), or angle (a line's slope in degrees).
- Pick the source object from the dropdown, then click + Link.
The link appears as a small card summarizing what it does — "follows Circle" or "Opacity ← Circle.width" — with × (scale) and + (offset) fields underneath so the tracked value doesn't have to be a 1:1 copy. A Follow link has separate ΔX/ΔY offsets instead, so the driven object can sit a fixed distance away rather than exactly on top of its source.
What you can link
| Target | Effect |
|---|---|
| Follow | Position tracks the source object's position, plus a fixed ΔX/ΔY offset |
| X / Y | One coordinate tracks the source's x, y, width, height, length, or angle — scaled and offset |
| Opacity | Opacity tracks any of those same six source values |
| Stroke width | Stroke width tracks any of those same six source values |
| Value (counters only) | A counter's displayed number tracks the source variable |
Why this beats keyframing the same thing by hand
If you keyframe object B's position to match object A, that only works for as long as A's motion stays exactly what it was when you built the keyframes — change A's animation later and B silently falls out of sync. A link has no such expiry: it reads A's actual value every frame, so any later change to A's motion, including ones from other links or baked physics, carries through automatically.
In the render
Links work in the finished video exactly as they do in the editor: the value is read fresh every frame. This is Manim's own way of doing live tracking, so nothing about the behaviour is specific to this editor.