Normally you would probably just define the joint position and orientation in local space and then transform the position and orientation into the body's global space. This is simple with matrices but how to do it in Blitz3D with pitch, yaw and roll is probably not as easy. :(