CollisionDetector optimization