How does a variable-sweep-wing aircraft keep wing-mounted payloads straight?
Mechanically this can be done using the simplest form of pantograph, as a hinged parallelogram with one end fixed to the fuselage and the other to the ordnance pylon. Or, I suppose you could implement a digital one.