Scientists at Israel’s Weizmann Institute have demonstrated that brains of mammals (including humans) contain a 3D compass. Microelectrode recordings revealed that certain neurons activate only when the head is at a particular 3D angle. It explains conditions such as vertigo and disorientation.
http://wis-wander.weizmann.ac.il/3d-compass-in-the-brain#.VKgjBckpqSo