Fix endeffector location when parent is transformed
This commit is contained in:
parent
697268cd0b
commit
a203ad7057
1 changed files with 3 additions and 3 deletions
|
@ -170,6 +170,9 @@ void IKViewer::calculate_kinematic_chain(Bone *base, Bone *endeffector)
|
|||
|
||||
Bone *bone = base_tree[base_index];
|
||||
|
||||
std::shared_ptr<Transform> inverse_static = std::shared_ptr<Transform>(new StaticTransform(inv(bone->calculate_transform_prev_to_current_without_dofs())));
|
||||
kinematic_chain.emplace_front(inverse_static);
|
||||
|
||||
//for (int i = bone->dof_count() - 1; i >= 0; i--)
|
||||
for (int i = 0; i < bone->dof_count(); i++)
|
||||
{
|
||||
|
@ -178,9 +181,6 @@ void IKViewer::calculate_kinematic_chain(Bone *base, Bone *endeffector)
|
|||
kinematic_chain.emplace_front(inverse_dof);
|
||||
}
|
||||
|
||||
std::shared_ptr<Transform> inverse_static = std::shared_ptr<Transform>(new StaticTransform(inv(bone->calculate_transform_prev_to_current_without_dofs())));
|
||||
kinematic_chain.emplace_front(inverse_static);
|
||||
|
||||
base_index--;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue