Show / Hide Table of Contents

RavelModifier

Quick facts
ClassRavelModifier
CellTypeUnchanged
CellDirUnchanged
CellRotationUnchanged
BoundUnchanged
PropertiesUnchanged
RequirementsBase 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.

In This Article
Back to top Generated by DocFX