collectResources and collisionDetection order