Introduce collision detection (work in progress).