The answer to this question would be: vestibular
Vestibular is an organ that was located in the ear that was responsible for balance function. In the vestibular organ, there are 3 circle like parts that each will be responsible for a dimension. The circle is was filled with fluid and the fluid will move if the head is accelerating.The interaction of these 3 circle makes the human head can detect rotation in 3 dimensions.