public void SetLocalDataFromBlendshapeBone(WowBone bone, WowVrcFileData.BlendshapeData.BoneData blendshapeBoneChange, float scale) { var matrix = Mat4.Identity(); Vec3 localPosition = bone.LocalPosition; localPosition.X += blendshapeBoneChange.LocalTransform.position.X * scale; localPosition.Y += blendshapeBoneChange.LocalTransform.position.Y * scale; localPosition.Z += blendshapeBoneChange.LocalTransform.position.Z * scale; matrix = Mat4.Translate(matrix, localPosition); // Поврота и скейла у базовых костей нет, так что учитываем только поврот и скейл из изменений блендшейпа matrix = Mat4.Multiply(matrix, Mat4.FromQuat(blendshapeBoneChange.LocalTransform.rotation)); matrix = Mat4.Scale(matrix, blendshapeBoneChange.LocalTransform.scale); LocalMatrix = matrix; }