Development of an optical sensor for measuring overall direction-of-action is treated. The measurement principle is based on distortions found in the projected image of a ball moving freely in a spherical vessel under the influence of the acceleration of gravity and motion. The measurement is carried out in a static condition. Thus, the sensor output stands for the direction of the gravitational field. Experimental results are presented to show that the angular errors are within 12 degrees for the overall direction. This sensor can be widely applied for measuring angular variations from the direction of the gravitational field.