Przeglądaj źródła

fixed KinematicRagdollControl for bullet

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7639 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 14 lat temu
rodzic
commit
e0ca5a4154

+ 2 - 2
engine/src/bullet/com/jme3/bullet/control/KinematicRagdollControl.java

@@ -193,9 +193,9 @@ public class KinematicRagdollControl implements PhysicsControl, PhysicsCollision
                 if (link.bone.getParent() == null) {
                 if (link.bone.getParent() == null) {
 
 
                     //offsetting the physic's position/rotation by the root bone inverse model space position/rotaion
                     //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);
                     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
                     //applying transforms to the model