Im not sure yet, why i did that, but, it seeams that when i get the angle to the target, my ship flip and then it would move backwards, lol. So i guess i modeled my model wrong, and i just did that small correction for testing.

About your code, changing the pan , will rotate it correctly? i mean, the x pos will pointing for the new pan or relative? thats why i use c_rotate.