Another way to calculate the distance from the exact location could be to subtract his position from the ideal location (corner). Then take the absolute value of that and see if it is less than your tolerance values.
For instance:
*note that the cornerx#,cornery#,and cornerz# values are the x,y, and z values of the intersection, respectively
tolerance=30
`assigns pacman location values
pacmanx#=object position x(pacmannumber)
pacmany#=object position y(pacmannumber)
pacmanz#=object position z(pacmannumber)
`calculates difference in the locations
pacmanx#=pacmanx#-cornerx#
pacmany#=pacmany#-cornery#
pacmanz#=pacmanz#-cornerz#
`do some boolean algebra
position_flag=(abs(pacmanx#)<=tolerance)*(abs(pacmany#)<=tolerance)*(abs(pacmanz#)<=tolerance)
`if all three values are less than or equal to the tolerance value-in this case 30- then position pacman
if position_flag=1
Position object pacmannumber,x,y,z
endif