Added distance sensing to camera code.