If you let the game engine drive the loop, you could easily implement a julia function that the game engine calls each sample instant to retrieve the state of the quadrotor. This function would be stateful, and advance the state of the quadrotor dynamics model a fixed step and output the new state. This would not need any hacks