The V2 autopilot guidance system had two free gyroscopes and simply kept it going in one direction...the targetting was set by rotating the launch platform so that this direction pointed towards the target. That sorted out the azimuth...the range was set by an accelerometer which cut off the engine at a predetermined velocity. Some later models had radio beam guidance.