Fix missing computation call

This commit is contained in:
rodolpheh 2023-11-21 08:53:26 +00:00
parent e78c1e0b27
commit 72c602fe67
1 changed files with 6 additions and 2 deletions

View File

@ -144,8 +144,10 @@ void UltraleapBone::fill_bone_data(Ref<UltraleapBone> bone, Ref<UltraleapBone> p
bone->width = leap_bone->width / 1000;
bone->orientation = UltraleapTypes::ultraleap_quaternion_to_godot_quaternion(&leap_bone->rotation);
previous_bone->next_bone = bone;
bone->previous_bone = previous_bone;
if (previous_bone != NULL) {
previous_bone->next_bone = bone;
bone->previous_bone = previous_bone;
}
// If palm is defined, this bone is either a metacarpal or an arm. We still compute relative transform though.
if (palm != NULL) {
@ -163,6 +165,8 @@ void UltraleapBone::fill_bone_data(Ref<UltraleapBone> bone, Ref<UltraleapBone> p
bone->rotation = relative_bone_transform.basis.get_quaternion();
bone->translation = relative_bone_transform.origin;
}
compute_bone_data(bone);
}
void UltraleapBone::compute_bone_data(Ref<UltraleapBone> bone) {