This is easy to do in c-script, but it would be much easier if it were built into the engine.
A Function for inversely rotating vectors. This makes it possible to convert world-space offsets to local-offsets. Here's what I've been using:
Code:
Function vec_iRotate(&_vec, &_ang)
{
var tAng[3];
vec_set(tAng, _ang);
vec_inverse(tAng);
vec_rotate(_vec, tAng);
}