Converts world X/Y coordinates to a grid coordinates.
1 number x
the X coordinate.
2 number y
the Y coordinate.
1 number
x-the tile X coordinate.
2 number
y-the tile Y coordinate.