cloth
Real cloth that moves in play: a flag on a pole, a curtain in a window, a banner between posts, a tarp on a frame, a sheet on a line, a cape. It hangs from its pins, blows in the scene's wind (gusts ripple across it) and never passes through the colliders and characters near it: poles, walls, crates, the player walking into it. A rectangle in the object's own XY plane facing +Z, width across centred on the origin and height up from it (a flag's left edge at x = -width/2, against the pole). Drawn from its own mesh; the editor shows it at rest (cloth tool view on runs it there). Tool: cloth (make, pin, retune, view, report).
In scene text
cloth { shape "…" width 1 height 1 }Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.
Fields 18
| Field | Type | Unit / range | What it does |
|---|---|---|---|
shape | text | — | What it is: flag, curtain, banner, tarp, sheet or cape (the cloth tool's make fills the rest for it). |
width | number | m, 0.05 … 20 | Across. |
height | number | m, 0.05 … 20 | Up from the object's origin. |
resolution | number | 0 … 64 | Particles across (0: about one every 5 cm, 8 to 48). More folds finer, costs more. |
gather | number | 1 … 3 | How much more cloth than its top edge is wide (1 flat ... 3): a curtain gathered on its rod hangs in deep folds (the curtain shape: 2). |
pins | text | — | Which edge or corners hang fixed: top (a curtain), left (a flag on a pole), right, corners (a tarp), top_corners (a banner), none (it falls). |
points | list of numbers | — | More pins at points on it: u, v pairs (0...1; u across from the left, v up from the bottom): (0.5, 1) pins the top middle. |
loose | list of text | — | Pins let go of (torn loose, pulled down): top_left, top_right, bottom_left, bottom_right, left, right, top, bottom or all. Scripts set it live. |
stiffness | number | 0 … 1 | How it resists bending: 0 silk ... 1 heavy canvas. |
stretch | number | 0 … 1 | How much it stretches: 0 woven ... 1 knit. |
weight | number | kg/m2, 0.01 … 5 | Silk 0.05, a cotton flag 0.15, a tarp 0.25, canvas 0.4, velvet 0.5. Heavy cloth catches less wind for its weight. |
damping | number | 0 … 1 | How quickly a swing dies. |
wind_response | number | 0 … 5 | x the scene's wind on it (0: it ignores the wind). |
wind | (x, y, z) | m/s | Wind of its own on top, world space (a draught through a window). |
collide | text | — | near: it meets the colliders and characters around it; none. |
thickness | number | m, 0.001 … 0.1 | How far it keeps off what it touches. |
outline | text | — | rectangle |
picture | text | — |