protected void matchPhysicObjectToBone(PhysicsBoneLink link, Vector3f position, Quaternion tmpRot1) {
        //computing position from rotation and scale
        targetModel.getWorldTransform().transformVector(link.bone.getModelSpacePosition(), position);

        //computing rotation
        tmpRot1.set(link.bone.getModelSpaceRotation()).multLocal(link.bone.getModelBindInverseRotation());
        targetModel.getWorldRotation().mult(tmpRot1, tmpRot1);
        tmpRot1.normalizeLocal();

        //updating physics location/rotation of the physics bone
        link.rigidBody.setPhysicsLocation(position);
        link.rigidBody.setPhysicsRotation(tmpRot1);

    }
Alter the transforms of a rigidBody to match the transforms of a bone.
This is used to make the ragdoll follow animated motion in Kinematic mode

@param link the bone link connecting the bone and the rigidBody
@param position temporary storage used in calculations (not null)
@param tmpRot1 temporary storage used in calculations (not null)
jme3-jbullet/src/main/java/com/jme3/bullet/control/KinematicRagdollControl.java