add a distance check to the inView check