Not sure if this is the best way, but something like this should work:

Php Code:
//when a key is pressed and player is near the door:
ANGLE angTmp;
ang_diff(angTmp, player.pan,door.pan);
vec_normalize(angTmp,1);

//repeat this until rotation finished
c_rotate(door,vector(angTmp.pan,0,0),0); 




regards Alain

Last edited by krial057; 12/14/11 14:26.