implemented coordinates behind obstacle