Component · terrain
TerrainChunk
Collision for one terrain tile (grid coordinates of the level's
Terrain). Author these in world cells to stream collision with the cells.Fields
x
i32Tile index along world X.
default 0
z
i32Tile index along world Z.
default 0
Usage
Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.
Add it
ara do component.add -p entity=name:Crate -p component=TerrainChunk --why "Add TerrainChunk"Set a field
ara do property.set -p entity=name:Crate -p path=TerrainChunk.x -p value=0 --why "Tune TerrainChunk"In a scene document
{
"TerrainChunk": {
"x": 0
}
}From C#
/// <summary>Place a terrain chunk in the next grid column.</summary>
public static void UseTerrainChunk(Entity entity, in Tick tick)
{
ref var component = ref World.Get<TerrainChunk>(entity);
component.X = 1;
}From C#
Scripts read and write it with Get<TerrainChunk>(); see the TerrainChunk struct.