terrain
Since 0.6
A terrain: a heightfield ground built from the op stack of a .terrain.json file, drawn, collided and navigated as one.
The entity's position is the terrain's origin; its rotation and scale must be identity. 3D projects only.
Use it in a scene entity's components list as { "type": "terrain", … }. The contract writes the fields flat and refuses unknown keys.
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
source | string | yes | Project-relative .terrain.json file. | ||
render | TerrainRenderMode | no | auto, off | Default auto: HD draws VG, standard draws LOD meshes. | |
collision | TerrainCollisionMode | no | heightfield, off | Default heightfield: the terrain is solid ground. off: no collider. | |
nav | boolean | no | Feed nav's heightfield source. Default true when the scene has nav. |
Rules that can refuse it
ground-cover-no-terrainground-cover-source-unknownocean-wave-mask-asset-missingphysics.water.river-caprender.hd.ground-cover-no-heightrender.hd.water.river-flow-inconsistentrender.hd.water.river-id-unknownterrain-extent-invalidterrain-in-2d-sceneterrain-layer-unknownterrain-multipleterrain-op-id-duplicateterrain-sample-invalidterrain-transformterrain/entity-buriedterrain/entity-floatingterrain/spawn-slopeterrainmod-no-terrainwaterways-without-terrain