Only a small contribution... if could be useful.

This is the code I included to convert the difference between camera and player.pan into a rotating force, limited to the character._turnspeed

Code:

//Only pan player when walking/attacking etc.
if ( my._state !=0 )
{

mPlayer_force.pan = (camera.pan - my.pan);

//if difference > 180 degrees, change to turn other side.
mPlayer_force.pan -= (abs(mPlayer_force.pan) > 180)* sign(mPlayer_force.pan)*360;

//Limite to maximum entity _turnspeed
my._panspeed = sign(mPlayer_force.pan)*min(my._turnspeed,abs(mPlayer_force.pan))*time_step;
}
else
{
my._panspeed = 0;
}



this rotating force is later used when moving the player (c_rotate)