[update] further refine direction logic upon obstacle detection