The hardware for three-dimensional (3D) tracking of ciliates was developed using two independent, perpendicular, optical pathways with one camera each. The two images were combined into one video image which was analysed in a computer digitizer to allow fully automatic tracking in real time of individual cells. In order to analyse step-up photophobic responses in three dimensions, the system generated 40 ms light pulses when an organism entered a predefined volume. The recorded tracks were analysed to extract areas, centroids and outlines of the cells and to calculate path parameters and velocities of the organisms. A mathematical package was developed to perform 3D statistics on the orientation distribution. Following undersaturating light flashes, cells of Stentor coeruleus oriented with respect to the light direction, indicating a one-instant mechanism of light direction detection. With saturating pulses, the orientation after the phobic response showed a gravitactic component.