Quadcopter tilt rotor

Hello and thank you for reading.

I want to build a quadcopter with forward and bacward tilting front and rear motors like this

I assume code wise that this would be achieved in the Quadplane configuration.

If so can any one give me some pointer as to how this would be achieved?