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
3.0
rem..om 14 years ago
parent b6d7b78a70
commit 698c50d8fd
  1. 1
      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());

Loading…
Cancel
Save