Raiden posted an obstacle avoidance code in this forum. It's in a Loopix post titled "Avoiding object while walking to player "