If you are the one who waits for the enemy from a camp, how do you normally fight the battle? In my case it depends if the enemy has numerical advantage over me or not.
If it hasn't or just an insignificant advantage, the enemy normally comes from only one same direction. I just put a few units in the front entrance to hold the enemy off. I disable fire at will on my range units. I choose their targets: first I aim at the enemy range units if I can reach them from inside the camp. If I can't, I wait until all the enemy melee units pile up there in the front entrance to the camp. Then I move all my range units outside to put them either at the flanks of the enemy melee units or at their rear. And fire at wil from there. I also send my cavalry to go after the enemy range units.