Пример #1
0
 public void SetPose(MMDMotionComponent motionComponent, float time)
 {
     currentTimeA = MathF.Floor(time / c_frameInterval) * c_frameInterval;
     foreach (var pair in stringMorphIndexMap)
     {
         WeightOrigin[pair.Value] = motionComponent.GetMorphWeight(pair.Key, time);
         motionComponent.GetABWeight(pair.Key, time, out WeightOriginA[pair.Value], out WeightOriginB[pair.Value]);
     }
     amountAB = Math.Max((time - currentTimeA) / c_frameInterval, 0);
 }
Пример #2
0
 public void SetPose(MMDMotionComponent motionComponent, MMDMorphStateComponent morphStateComponent, float time)
 {
     foreach (var bone in bones)
     {
         var keyframe = motionComponent.GetBoneMotion(bone.Name, time);
         bone.rotation                   = keyframe.rotation;
         bone.dynamicPosition            = keyframe.translation;
         cachedBoneKeyFrames[bone.index] = keyframe;
     }
     UpdateAllMatrix();
     SetPose(morphStateComponent);
 }