CubeGrid
Quick facts | |
---|---|
Grid | CubeGrid |
CellType | CubeCellType |
CellDir | CubeDir |
CellRotation | CubeRotation |
Bound | CubeBound |
Properties | 3d, Planar, Repeating, Infinite |
CubeGrid is a 3d grid.
Increasing the x co-ordinate of a cell moves right, and the y co-ordinate up and z-cordinate forward. (though these are just labelling conventions in Sylves, you are free to use the co-ordinates differently).
CubeRotation
supports rotations on all three axes, so there are 48 possible values (of which 24 are various reflections).
CubeGrid can also represent cuboids, just use the constructor which accepts a Vector3 cellSize
.
Cell co-ordinates
The cell (0, 0, 0) has bounds from 0 to 1 in each axis (for a grid with cell size of 1). That means that the cell center of cell (0, 0, 0) is at new Vector2(0.5f, 0.5f, 0.5f)
. This is the usual convention for square grids, but can be a bit surprising if you are not ready for it.