enter image description here The TileMap has Grass Tiles on every 50x50 corner of the map. yet when the function of gettiles() argument is inserted with the tile position from the world to map position of global mouse position from getglobalmouseposition().
the function always return -1 (Invalid_tiles). enter image description here