Hello,
I’ve been at this for a while and somehow haven’t found a reliable solution yet, not from myself, or various sources online which is why I’m here.
I’m looking for a way to get a joint hierarchy from a ChainRoot and EndEffector much like how the IKControl instance does before applying inverse kinematics.
For instance,
print (GetJointHierarchy (RightShoulder, RightWrist)) would print
{RightShoulder, RightElbow, RightWrist}
So far the most I know for sure is that an iterative approach should be taken.
local function GetJointHierarchy (ChainRoot, EndEffector) local Hierarchy = {} local CurrentRoot = ChainRoot while CurrentRoot ~= EndEffector do -- Proceed to next root -- Add to Hierarchy end return Hierarchy end As you can see, I need help with practically everything.
The most difficult part will be ensuring that the function considers the possibility a single root might diverge into multiple paths, with only one reaching the EndEffector.
This has been really scratching my brain, so please; any help is appreciated.