Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal void FinishAnimation(Matrix worldMatrix)
- {
- //-----------------------------------------------
- int lenght = worldTransforms.Length;
- //bonetransform is keyframe nature from the fbx
- worldTransforms[0] = boneTransforms[0] * currentAnimation.inverseBindPose[0]
- * skinData.BindPose[0] * worldMatrix;
- for (int i = 1; i < lenght; i++)
- {
- int parent = skinData.SkeletonHierarchy[i];
- worldTransforms[i] = boneTransforms[i]
- * currentAnimation.inverseBindPose[i] * skinData.BindPose[i] * worldTransforms[parent];
- }
- for (int i = 0; i < lenght; i++)
- {
- skinTransforms[i] = skinData.InverseBindPose[i] * worldTransforms[i];
- }
- }
Add Comment
Please, Sign In to add comment