Use the other vector parameter of c_move, rotated around just your pan:
c_move(my, nullvector, vec_rotate(speed, vector(my.pan, 0, 0)), IGNORE_PASSABLE|GLIDE);
That's the quick and dirty version -- in the process "speed" gets modified to be the character's absolute speed, rather than relative speed, so if instead of assigning values to speed's parameters you want to do stuff gradually over time, you'll need another VECTOR so you can do vec_rotate without changing your speed VECTOR.
Jibb