Added distance detection for non-player objects to player