ReadonlycolumnsNumber of height samples along local X. An integer ≥ 2.
Readonlyheightsrows * columns finite heights in column-major order: the sample at
(row, column) is heights[row + column * rows].
ReadonlyrowsNumber of height samples along local Z. An integer ≥ 2.
ReadonlyscaleThe field's extent in local X and Z, and the multiplier applied to every height along local Y. All three components must be > 0.
Readonlytype
A height field,
"3d"only (§24) — a regular grid of heights along local Y.Layout (measured, not assumed)
rowsandcolumnsare sample counts, not subdivisions, because a caller counts the numbers they have.heights.lengthis thereforerows * columns, and the adapter hands the solverrows - 1/columns - 1(Rapier'sheightfield(nrows, ncols, …)takes subdivisions and wants(nrows + 1) * (ncols + 1)heights — verified 2026-08-08 by readingnrows/ncols/heights.lengthback off a built collider).heightsis column-major: the sample at grid position(row, column)isheights[row + column * rows]. Which world axis each index walks was measured, again against Rapier 0.19.3, by building a 2×2 field with heights[0, 1, 2, 3]andscale = (2, 1, 2)and raycasting down at its four corners:x = −1, z = −10(0, 0)x = −1, z = +11(1, 0)x = +1, z = −12(0, 1)x = +1, z = +13(1, 1)So
rowwalks local Z andcolumnwalks local X, which is the opposite of the guess a "rows are horizontal" reading produces. The field is centred on the collider origin and spansscale.xin X andscale.zin Z, with every height multiplied byscale.y.Composite: refused as a §30 query shape (see the module header).