Fish, for example, have a 'dorsal light response' in which they will always attempt to orient their back (dorsum) to a bright light, presuming it is the sun and thus remaining 'upright' compared to the Earth's surface / sea floor. And all animals have gravity sensors that inform them of the 'down' direction, towards the Earth's center, due to the constant force of gravitation. In plants and invertebrates such sensors include 'heavy bodies', often tiny crystals termed 'statoliths', in e.g. jellyfish cells, that sag towards the Earth center and assist in maintaining attitude. In vertebrates, they include the macula, a heavy body supported by very slender tissues that bend with the slightest distrubance, sending signals to the brain, and sensilla, also hair-like receptors that deform under even slight changes in attitude in relation to Earth.
You can read more detail in Anken, R.H, and H. Rahmann, 2002. Gravitational Zoology:How Animals Use and Cope with Gravity. Pp. 315-333 in Horneck, G. and C. Baumstark-Khan (eds). 2002. Astrobiology. Springer, Berlin.