Sorry for a late response, but your problem is related with passing floats to the function. You should use:
Math.floor(axis_position);
In order to make them integers. Also you need to consider the tile position for example if you're doing a sidescroller then tiles will be actor_position - 1 on Y axis (Since the player will be walking over the tile) if you are doing a top down view then you shouldn't have that problem.