So I was developing a simple AI that starts chasing the player after it seeing it but there is something wrong about the animation. The model basically runs like a crab which means sideways. I tried with other models and there is no problem however this particular one is not facing the direction it is supposed to be facing in MED. There is like a 45 degree difference. I tried just simply selecting all then rotating it but that results in the running animation being an abomination. Skeleton completely gets destroyed. Anyway to get around this ? Either through MED or script ?

This is how I turn the model by the way :

vec_diff(temp_vec,player.x,my.x);
vec_to_angle(temp_angle,temp_vec);
my.pan += ang(temp_angle.pan - my.pan) * 0.45 * time_step;