From 698c50d8fd43f2770f4b2707b2224218ace6f3ba Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Fri, 20 May 2011 19:17:51 +0000 Subject: [PATCH] KinematicRagdollControl now correctly apply inverse world transforms of the parent of the model git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7512 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jbullet/com/jme3/bullet/control/KinematicRagdollControl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/src/jbullet/com/jme3/bullet/control/KinematicRagdollControl.java b/engine/src/jbullet/com/jme3/bullet/control/KinematicRagdollControl.java index 5164603c3..7937780e4 100644 --- a/engine/src/jbullet/com/jme3/bullet/control/KinematicRagdollControl.java +++ b/engine/src/jbullet/com/jme3/bullet/control/KinematicRagdollControl.java @@ -194,6 +194,7 @@ public class KinematicRagdollControl implements PhysicsControl, PhysicsCollision //offsetting the physic's position/rotation by the root bone inverse model space position/rotaion modelPosition.set(p).subtractLocal(link.bone.getInitialPos()); + targetModel.getParent().getWorldTransform().transformInverseVector(modelPosition, modelPosition); modelRotation.set(q).multLocal(tmpRot2.set(link.bone.getInitialRot()).inverseLocal());