You can use DeltaPitch and DeltaYaw between the missile and its target to determine whether it needs to turn left/right/up/down.
I'll leave you to work it out from there - its very easy once you know about those two commands.
I'll leave you to work it out from there - its very easy once you know about those two commands.