Fix the bone index for rigid indices in the list
This commit is contained in:
parent
53e64e1288
commit
cdc9f2d697
Binary file not shown.
@ -78,6 +78,8 @@ namespace FirstPlugin
|
||||
}
|
||||
}
|
||||
|
||||
BoneIndex = 0;
|
||||
|
||||
//Rigid Indices come after smooth indices. Start from the last smooth index
|
||||
ushort RigidIndex = (ushort)(SmoothIndices.Count);
|
||||
foreach (BfresBone bn in fmdl.Skeleton.bones)
|
||||
@ -89,10 +91,12 @@ namespace FirstPlugin
|
||||
Bone.RigidMatrixIndex = bn.RigidMatrixIndex;
|
||||
RigidIndices.Add(BoneIndex);
|
||||
}
|
||||
|
||||
BoneIndex++;
|
||||
}
|
||||
|
||||
//Rigid indices at the end
|
||||
var AllIndices = SmoothIndices.Concat(RigidIndices).ToList();
|
||||
//Rigid indices at the end
|
||||
var AllIndices = SmoothIndices.Concat(RigidIndices).ToList();
|
||||
model.Skeleton.MatrixToBoneList = AllIndices.ToArray();
|
||||
model.Skeleton.InverseModelMatrices = SmoothMatrices;
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user