Animation

Keyframe clips for voxel and built assets, nine presets, the clips of imported models and borrowing animations between skeletons that share bones.

The asset editor’s Animate surface gives your assets motion. Voxel and built assets animate with keyframes, part by part. Imported models play the clips in their file, and a rigged character with no animation can borrow another one’s. In game the runtime picks the right clip on its own: walk while moving, idle when still, jump, hit, attack.

The studio’s Animate surface
Animate: the clip list, the timeline and the current key’s values. You get here from Cast or Build.

Clips, tracks and keys

A clip is a named animation with a duration and a loop option. It holds one track per animated part, and each track a series of keyframes: at a given time, an optional position, rotation and scale. Between two keys, values interpolate with a smooth ease curve; when looping, the last key eases back to the first to close the cycle.

idstringrequired
Id, used by per-entity overrides.
namestringrequired
Name the runtime reads to pick the clip (walk, idle, hop…).
durationnumberrequired
Duration in seconds.
loopbooleanrequired
Plays in a loop.
tracksTrack[]required
One track per animated part.
Animations are additive: a position key offsets the part from its rest position. Positions are in voxels and follow the asset’s scale.

Editing keyframes

  1. Create a clip

    “New clip”, or start from a preset (below). Set its name, duration and loop.

  2. Scrub to a time

    The time slider snaps to 0.05 s steps. Play / Pause previews the clip in the viewport.

  3. Pick a part and set values

    Changing position, rotation or scale creates a key at the current time on the chosen part, or updates the one already there.

  4. Move on

    Move the slider, set values, repeat. “Delete key” removes the key at the current time.

Presets

Nine presets create a full clip in one click. They read part names to know what to move: name your parts leg, arm, wheel, tail, weapon or body and they work with no tuning. They also exist in the “Quick animation” panel of Build mode.

PresetDurationLoopWhat it animates
Bob1,6 s✓Whole model floats up and down. Coins, pickups.
Spin2 s✓Whole model turns on Y. Collectibles, signs.
Walk0,6 s✓leg/foot and arm/hand parts alternate, body bounces.
Wheels0,5 s✓wheel/tire parts roll on X. Vehicles.
Wave0,8 s✓arm/hand parts wave.
Hop0,7 s—A jump with squash and stretch.
Shake0,3 s—Short hit reaction.
Breathe2,4 s✓Slow idle scale change.
Swing0,5 s—weapon/sword/tail/arm parts swing forward.

How the runtime picks a clip

In game every actor has an animation role (ClipRole) depending on what it does. The runtime looks for a clip whose name contains one of the associated words, case-insensitive. Preset names are already recognised.

RoleWhenRecognised names
movemovingwalk, run, wheel, move; otherwise the first clip
idlestanding stillidle, breathe, bob, spin
jumpjumpinghop, jump
hithitshake, hit
attackattackingswing, attack
spinpickupsspin, bob

Per-entity override

An entity’s params.clips field maps a role to a specific clip: { idle: "<clip id>" }. For a voxel or built asset the override is a clip id and wins over the name lookup. For an imported model it is a clip name from the file, used when no recognised name matches.

entity.jsonJSON
{
  "id": "e_guard",
  "assetId": "a_knight",
  "role": "npc",
  "pos": [4, 1, -2],
  "yaw": 90,
  "scale": 1,
  "params": { "behavior": "guard", "clips": { "idle": "Idle_Combat" } }
}

Imported model clips

A rigged GLB comes with its own clips; the studio lists them on the Animate surface and a click previews one. They play as they are: the keyframe editor only applies to voxel and built assets. For your own model, export clips named walk, idle, jump, attack, hit from your tool.

The library has 110 models with three clips or more (KayKit and Kenney characters, Quaternius creatures…).

Borrowing animations

A rigged character without animation can play another library character’s clips. In the “Animation library · borrow clips” section, pick a source rig: its URL is stored in model.animFrom, and its clips add to the model’s own.

Same skeleton required

Borrowing relies on bone names. Only the tracks whose bone exists on the target model are kept, and a clip is only retained if at least 3 tracks and at least 40 % of its original tracks remain. In practice it works within one pack: KayKit adventurers and skeletons together, Quaternius characters together. If the model already has a clip with the same name, its own wins.
model.jsonJSON
{
  "format": "glb",
  "url": "https://…/library/kaykit-rogue.glb",
  "animations": [],
  "fit": 1, "lift": 0, "height": 1.8, "bytes": 1048576,
  "animFrom": "https://…/library/kaykit-knight.glb"
}
A model without clips borrowing those of another rig from the same pack.

See also