From e0ca5a41548325b0a7a0956f15cc1062cc694b34 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Wed, 15 Jun 2011 21:05:51 +0000 Subject: [PATCH] fixed KinematicRagdollControl for bullet git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7639 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/bullet/control/KinematicRagdollControl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java b/engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java index 08809f3a2..a7dd9dd19 100644 --- a/engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java +++ b/engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java @@ -193,9 +193,9 @@ public class KinematicRagdollControl implements PhysicsControl, PhysicsCollision if (link.bone.getParent() == null) { //offsetting the physic's position/rotation by the root bone inverse model space position/rotaion - modelPosition.set(p).subtractLocal(link.bone.getInitialPos()); + modelPosition.set(p).subtractLocal(link.bone.getWorldBindPosition()); targetModel.getParent().getWorldTransform().transformInverseVector(modelPosition, modelPosition); - modelRotation.set(q).multLocal(tmpRot2.set(link.bone.getInitialRot()).inverseLocal()); + modelRotation.set(q).multLocal(tmpRot2.set(link.bone.getWorldBindRotation()).inverseLocal()); //applying transforms to the model