set distance as -1 to judge out of range