Improved collision detection demo