I have a terrain and I want to divide it into 1x1 meter sections so I can keep track of where objects are placed (on a grid) and the state of the tile (on a grid).
The tiles are currently composed of:
- Position on the terrain.
- Position on the grid.
- The state of the tile.
- A gameobject.
The problem I’ve run into is trying to find the size of the terrain. I looked inside the transform component and it only has data on the position and scale of the object. I know terrains default to 1000x1000m, but can I assume that length = 1000 * scale.z
and width = 1000 * scale.x
?