rig_2d
2D: a cut-out character: parts of one image on a hierarchy of bones, posed by keyed poses and clips (cross-blended), with attachment swaps (a sword for an axe), draw-order keys and two-bone IK (feet on the ground, a hand on a lever). anim_2d's states, frame events and boxes drive it like a sheet (a rig clip's keys are its frames). Scripts: self.rig.play("attack"), self.rig.attach("hand_r", "axe"), self.rig.target("leg_l", [x, y]).
In scene text
rig_2d { image "…" bones ["a", "b"] attachments ["a", "b"] }Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.
Fields 13
| Field | Type | Unit / range | What it does |
|---|---|---|---|
image | text | — | The parts image in Assets. |
bones | list of text | — | Bones, parents first: "name parent x y angle part=x,y,w,h pivot=px,py z=1 len=40" (rest pose from the parent, "-" for none; part: its rectangle of the image in pixels; pivot: shares of the part). |
attachments | list of text | — | Pictures a bone can swap between: ["hand_r: sword=0,0,20,80 axe=20,0,20,80"] (first shown). |
poses | list of text | — | Keyed poses: ["wind: arm_r=-80 torso=-10 head.y=2 arm_r.z=5 hand_r.attach=axe"] (degrees from rest; .x .y offsets, .s scale, .z order, .attach a picture). |
clips | list of text | — | Clips of poses at seconds: ["walk=step_a@0 step_b@0.25 step_a@0.5", "attack=wind@0 strike@0.08 recover@0.25 idle@0.45 once"]. |
ik | list of text | — | Two-bone IK: ["leg_l: thigh_l shin_l target=foot_l bend=1"] (the chain reaches the target bone's point; scripts can move it). |
clip | text | — | The clip playing from the start. |
pixels_per_unit | number | 0.01 … 100 | Image pixels per world unit. |
layer | number | -1000 … 1000 | Drawing order (parts sort inside it by z). |
flip_x | true / false | — | Mirrored (facing left). |
tint | colour (r, g, b) | — | Multiplies its colours. |
opacity | number | 0 … 1 | 0 invisible, 1 solid. |
blend | number | s, 0 … 2 | Seconds of cross-blend between clips. |
Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us