basic collision detection for walls and tables