Fix missing call to OnAnimationUpdated when using custom skeleton pose
This commit is contained in:
@@ -70,22 +70,8 @@ void AnimationManagerService::Update()
|
||||
|
||||
// Evaluate animated nodes pose
|
||||
graph->GraphExecutor.Update(animatedModel->GraphInstance, dt);
|
||||
|
||||
// Calculate the final bones transformations
|
||||
{
|
||||
ANIM_GRAPH_PROFILE_EVENT("Final Pose");
|
||||
auto& skeleton = animatedModel->SkinnedModel->Skeleton;
|
||||
UpdateBones.Resize(skeleton.Bones.Count(), false);
|
||||
for (int32 boneIndex = 0; boneIndex < skeleton.Bones.Count(); boneIndex++)
|
||||
{
|
||||
auto& bone = skeleton.Bones[boneIndex];
|
||||
UpdateBones[boneIndex] = bone.OffsetMatrix * animatedModel->GraphInstance.NodesPose[bone.NodeIndex];
|
||||
}
|
||||
}
|
||||
|
||||
// Update gameplay
|
||||
const bool usePrevFrameBones = animatedModel->PerBoneMotionBlur;
|
||||
animatedModel->_skinningData.SetData(UpdateBones.Get(), !usePrevFrameBones);
|
||||
animatedModel->OnAnimationUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user