(almost) fully functional collision detection