Snapping mouse to grid

This commit is contained in:
Alexey 2025-05-20 09:31:19 +03:00
commit 74fdcd51f7
4 changed files with 29 additions and 11 deletions

View file

@ -14,5 +14,5 @@ end
-- Same as coords, but converted to global coords
function GridPoint:globalCoords()
return self.x * Config.cellSize, self.y * Config.cellSize
return self.x * Config.cellSize - Config.cellSize / 2, self.y * Config.cellSize - Config.cellSize / 2
end