Debugged collision detection implementation