just make it detect where the sprite is and not where the tile is itself. like you have your sprite coords, use those coords to check if it is on that tile.