From c950dcfa5a0302d940f9dab7ce897bc3c19d829e Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Thu, 22 Dec 2022 16:31:28 -0600 Subject: [PATCH] Adjusted puppet arm pivots based on body angles. --- .../noppes/npcs/client/model/ModelMPM.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/noppes/npcs/client/model/ModelMPM.java b/src/main/java/noppes/npcs/client/model/ModelMPM.java index 94d942399..13518c624 100644 --- a/src/main/java/noppes/npcs/client/model/ModelMPM.java +++ b/src/main/java/noppes/npcs/client/model/ModelMPM.java @@ -566,10 +566,21 @@ public class ModelMPM extends ModelNPCMale{ this.setInterpolatedAngles(job,bipedRightLegWear,job.rleg); } - this.bipedRightArm.rotationPointZ = MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F; - this.bipedRightArm.rotationPointX = -MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F; - this.bipedLeftArm.rotationPointZ = -MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F; - this.bipedLeftArm.rotationPointX = MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F; + this.bipedRightArm.rotationPointX = + -MathHelper.cos(this.bipedBody.rotateAngleY) * MathHelper.cos(this.bipedBody.rotateAngleZ) * 5.0F; + this.bipedRightArm.rotationPointY = + MathHelper.cos(this.bipedBody.rotateAngleZ) * 2 + + -MathHelper.sin(this.bipedBody.rotateAngleZ) * MathHelper.cos(this.bipedBody.rotateAngleY) * 5; + this.bipedRightArm.rotationPointZ = MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F + + MathHelper.sin(this.bipedBody.rotateAngleY); + + this.bipedLeftArm.rotationPointX = + MathHelper.cos(this.bipedBody.rotateAngleY) * MathHelper.cos(this.bipedBody.rotateAngleZ) * 5.0F; + this.bipedLeftArm.rotationPointY = + MathHelper.cos(this.bipedBody.rotateAngleZ) * 2 + + MathHelper.sin(this.bipedBody.rotateAngleZ) * MathHelper.cos(this.bipedBody.rotateAngleY) * 5; + this.bipedLeftArm.rotationPointZ = -MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F + + -MathHelper.sin(this.bipedBody.rotateAngleY); this.bipedRightLeg.rotationPointX = -MathHelper.cos(this.bipedBody.rotateAngleY) * 2.0F +