Ryan0805 wrote: Tue Aug 25, 2020 3:36 am
I can get bone's position using _getDerivedPosition() function. However, I can't get the tip position since bone3 doesn't have child bone.
Is there a way to get the position of the tip?
That information is lost because it is not exported. Only the head's data is exported.
You can assume the bone to be of a certain size (e.g. 1 unit) and see if it has been preserved through scale: e.g.
Code: Select all
pos = bone3->_getDerivedPosition();
rot = bone3->_getDerivedOrientation();
scale = bone3->_getDerivedScale();
tip = pos + rot * scale.z;
But I can't guarantee this will get you the same exact result as what you are seeing in Blender/Maya/etc. The orientation will be correct but how large the bone is may be wrong.