Calculate distance from the light spot to the object