ModelRenderer - Fix pivot points not working on horse model properly

This commit is contained in:
miku-666
2024-11-24 13:52:21 +01:00
parent dd729f203e
commit f29f6dfdcd

View File

@@ -208,9 +208,9 @@ namespace PckStudio.Rendering
continue;
}
Vector3 translation = modelPart.Translation.ToOpenTKVector();
Vector3 pivot = translation * -1 - parentPivot;
Vector3 pivot = translation * -1;
Vector3 rotation = (modelPart.Rotation.ToOpenTKVector() + modelPart.AdditionalRotation.ToOpenTKVector());
CubeMeshCollection cubeCollection = new CubeMeshCollection(modelPart.Name, translation - parentTranslation, pivot, rotation - parentRotation);
CubeMeshCollection cubeCollection = new CubeMeshCollection(modelPart.Name, translation - parentTranslation, pivot - parentPivot, rotation - parentRotation);
cubeCollection.FlipZMapping = true;
foreach (ModelBox boxes in modelPart.GetBoxes())
{