getBlockCenterPosition method

Vector2 getBlockCenterPosition(
  1. Block block
)

Get the position of the center of the surface of the isometric tile in the cartesian coordinate space.

This is the opposite of getBlock.

Implementation

Vector2 getBlockCenterPosition(Block block) {
  final tile = effectiveTileSize;
  return getBlockRenderPosition(block) +
      Vector2(tile.x / 2, tile.y - effectiveTileHeight - tile.y / 4);
}