RavelModifier
| Quick facts | |
|---|---|
| Class | RavelModifier |
| CellType | Unchanged |
| CellDir | Unchanged |
| CellRotation | Unchanged |
| Bound | Unchanged |
| Properties | Unchanged |
| Requirements | Base grid must be finite |
This is a specific version of biject modifier that re-labels the cells so that the cell co-ordinates always have zero for the y value and z value, and the x value simply counts upwards from zero.
It does this by calling GetIndex on the underlying grid.
For example, we could bound the square grid, then apply
new RavelModifier(squareGrid.BoundBy(new SquareBound(new Vector2Int(-1, -1), new Vector2Int(2, 2)))),
➡
Cell co-ordinates
Cell co-ordinates always have zero for the y value and z value, and the x value counts upwards from zero.