public AbsoluteEntityCell(Vector3 worldSpace, int level) { Level = level; Vector3 localPosition = (worldSpace + Map.BATCH_DIMENSION_CENTERING.ToVector3()) / Map.BATCH_SIZE; BatchId = Int3.Floor(localPosition); CellId = Int3.Floor(((localPosition - BatchId.ToVector3()) * GetCellsPerBlock()).AddScalar(0.0001f)); }
public AbsoluteEntityCell(NitroxVector3 worldSpace, int level) { Level = level; NitroxVector3 localPosition = (worldSpace + Map.Main.BatchDimensionCenter) / Map.Main.BatchSize; BatchId = Int3.Floor(localPosition); NitroxVector3 cell = (localPosition - BatchId) * GetCellsPerBlock(); CellId = Int3.Floor(new NitroxVector3(cell.X + 0.0001f, cell.Y + 0.0001f, cell.Z + 0.0001f)); }
public AbsoluteEntityCell(Vector3 worldSpace, int level) { Level = level; Vector3 localPosition = (worldSpace + Map.Main.BatchDimensionCenter.ToVector3()) / Map.Main.BatchSize; BatchId = Int3.Floor(localPosition); Vector3 cell = (localPosition - BatchId.ToVector3()) * GetCellsPerBlock(); CellId = Int3.Floor(new Vector3(cell.x + 0.0001f, cell.y + 0.0001f, cell.z + 0.0001f)); }