Implementation and test results are presented for a 3D sensor based on the time-of-flight rangefinding technique. The sensor is mainly intended for teaching robot paths for small and medium sized robots. The 3D sensor consists of a pointer, a laser rangefinder and a servo-controlled receiver camera unit. The position and orientation of the pointer is obtained by using range information to measure the distance of its tip and its angle with respect to the optical axis of the receiver, and by using the camera image to detect the angle of the pointer on the plane perpendicular to this optical axis. The rangefinder uses diffusely radiating discs attached to the pointer to transmit light pulses to the receiver. The resolution of the distance and angle measurement are 1.3 mm (a-value)and 0.30 (a-value) in the ranges of 2-5 m and +/- 400, respectively. The sensor will be used in an experimental robot workcell to examine interactive robot control methods.