Baffled, confused, mystified, at a loss, not thinking clearly, or uncertain.
He was just standing there, turning this way and that, with a bewildered look on his face.
Stupefied; dazed; nonfunctional.
Standing erect but not consciously aware of one's surroundings, or only minimally aware, and having little or no ability to control one's bodily actions, as a result of physical injury or exhaustion.