Snapping mouse to grid
This commit is contained in:
parent
f765ec74ef
commit
74fdcd51f7
4 changed files with 29 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue