From f29f6dfdcd015acdcc243a13a6f931421b0a2f46 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sun, 24 Nov 2024 13:52:21 +0100 Subject: [PATCH] ModelRenderer - Fix pivot points not working on horse model properly --- PCK-Studio/Rendering/ModelRenderer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PCK-Studio/Rendering/ModelRenderer.cs b/PCK-Studio/Rendering/ModelRenderer.cs index 373664ff..d0487462 100644 --- a/PCK-Studio/Rendering/ModelRenderer.cs +++ b/PCK-Studio/Rendering/ModelRenderer.cs @@ -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()) {