Soo i have problems applying the rotation properly after i glue an object to a limb, i made some code where i basically cut off a limb and then reapply it to the model. Using the ninja model from the DarkMatter.
int NinjaLimbObject = GetNextObjectID();
dbMakeObjectFromLimb(NinjaLimbObject, ModelID, 11);
dbPositionObject(NinjaLimbObject, 0, 0, 0);
dbScaleObject(NinjaLimbObject, 1000, 1000, 1000);
dbGlueObjectToLimb(NinjaLimbObject, ModelID, 11);
I attached an image of the outcome. Clearly i have to rotate the object in some way. Maybe something like i do with the Position Object. As the rotation becomes relative to the limb. However i did this:
float a = dbObjectAngleX(NinjaLimb);
float b = dbObjectAngleY(NinjaLimb);
float c = dbObjectAngleZ(NinjaLimb);
And they all returned 0.