responsive to distance between spray apparatus and target