Controller based Thrust Vectoring

Hi All,
Am looking to do the inital programming of the 3D thrust vectoring on my quad drone where the exhausts are all vectored.

Given that the thrust vectoring will be based on the controller input, how should I go about it?