Avoid collisions with walls and another objects