Skip to content

Commit

Permalink
修正某些模型导出问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sselecirPyM committed Aug 8, 2021
1 parent 266b420 commit f8b89f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MMDMotionCompute/Functions/GLTFUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void _reset()

foreach (var bone in character.bones)
{
boneKeyFrames[bone.Name].Add(new BoneKeyFrame { Frame = t, Translation = bone.dynamicPosition, Rotation = bone.rotation });
boneKeyFrames[bone.Name].Add(new BoneKeyFrame { Frame = t, Translation = bone.dynamicPosition, Rotation = bone.finalRotation });
}
}
float[] min;
Expand Down
4 changes: 1 addition & 3 deletions MMDMotionCompute/MMD/MMDCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public void BakeSequenceProcessMatrixsIndex()
continue;
var parent = bones[bones[i].ParentIndex];
bonesTest[i] |= bonesTest[bones[i].ParentIndex];
bonesTest[i] |= parent.IsPhysicsFreeBone;
if (bonesTest[i])
{
PhysicsNeedUpdateMatIndexs.Add(i);
Expand Down Expand Up @@ -402,7 +401,6 @@ public static MMDCharacter Load(PMXFormat pmx)
Name = _bone.Name,
Flags = _bone.Flags,
NameEN = _bone.NameEN,

};

if (bone.Flags.HasFlag(PMX_BoneFlag.HasIK))
Expand Down Expand Up @@ -473,6 +471,7 @@ public class Bone
public Vector3 appendTranslation;
public Quaternion appendRotation = Quaternion.Identity;
public int index;
public Quaternion finalRotation { get => rotation * appendRotation; }

public int CCDIterateLimit = 0;
public float CCDAngleLimit = 0;
Expand All @@ -484,7 +483,6 @@ public class Bone
public string NameEN;
public bool IsAppendRotation;
public bool IsAppendTranslation;
public bool IsPhysicsFreeBone;
public PMX_BoneFlag Flags;
public IKLink[] boneIKLinks;
public float AppendRatio;
Expand Down

0 comments on commit f8b89f9

Please sign in to comment.