Przeglądaj źródła

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
rem..om 14 lat temu
rodzic
commit
698c50d8fd

+ 1 - 0
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());