@Override
    public void read(JmeImporter im) throws IOException {
        super.read(im);
        InputCapsule capsule = im.getCapsule(this);
        float dampingDirAng = capsule.readFloat("dampingDirAng", 0f);
        float dampingDirLin = capsule.readFloat("dampingDirLin", 0f);
        float dampingLimAng = capsule.readFloat("dampingLimAng", 0f);
        float dampingLimLin = capsule.readFloat("dampingLimLin", 0f);
        float dampingOrthoAng = capsule.readFloat("dampingOrthoAng", 0f);
        float dampingOrthoLin = capsule.readFloat("dampingOrthoLin", 0f);
        float lowerAngLimit = capsule.readFloat("lowerAngLimit", 0f);
        float lowerLinLimit = capsule.readFloat("lowerLinLimit", 0f);
        float maxAngMotorForce = capsule.readFloat("maxAngMotorForce", 0f);
        float maxLinMotorForce = capsule.readFloat("maxLinMotorForce", 0f);
        boolean poweredAngMotor = capsule.readBoolean("poweredAngMotor", false);
        boolean poweredLinMotor = capsule.readBoolean("poweredLinMotor", false);
        float restitutionDirAng = capsule.readFloat("restitutionDirAng", 0f);
        float restitutionDirLin = capsule.readFloat("restitutionDirLin", 0f);
        float restitutionLimAng = capsule.readFloat("restitutionLimAng", 0f);
        float restitutionLimLin = capsule.readFloat("restitutionLimLin", 0f);
        float restitutionOrthoAng = capsule.readFloat("restitutionOrthoAng", 0f);
        float restitutionOrthoLin = capsule.readFloat("restitutionOrthoLin", 0f);

        float softnessDirAng = capsule.readFloat("softnessDirAng", 0f);
        float softnessDirLin = capsule.readFloat("softnessDirLin", 0f);
        float softnessLimAng = capsule.readFloat("softnessLimAng", 0f);
        float softnessLimLin = capsule.readFloat("softnessLimLin", 0f);
        float softnessOrthoAng = capsule.readFloat("softnessOrthoAng", 0f);
        float softnessOrthoLin = capsule.readFloat("softnessOrthoLin", 0f);

        float targetAngMotorVelicoty = capsule.readFloat("targetAngMotorVelicoty", 0f);
        float targetLinMotorVelicoty = capsule.readFloat("targetLinMotorVelicoty", 0f);

        float upperAngLimit = capsule.readFloat("upperAngLimit", 0f);
        float upperLinLimit = capsule.readFloat("upperLinLimit", 0f);

        useLinearReferenceFrameA = capsule.readBoolean("useLinearReferenceFrameA", false);

        createJoint();

        ((SliderConstraint)constraint).setDampingDirAng(dampingDirAng);
        ((SliderConstraint)constraint).setDampingDirLin(dampingDirLin);
        ((SliderConstraint)constraint).setDampingLimAng(dampingLimAng);
        ((SliderConstraint)constraint).setDampingLimLin(dampingLimLin);
        ((SliderConstraint)constraint).setDampingOrthoAng(dampingOrthoAng);
        ((SliderConstraint)constraint).setDampingOrthoLin(dampingOrthoLin);
        ((SliderConstraint)constraint).setLowerAngLimit(lowerAngLimit);
        ((SliderConstraint)constraint).setLowerLinLimit(lowerLinLimit);
        ((SliderConstraint)constraint).setMaxAngMotorForce(maxAngMotorForce);
        ((SliderConstraint)constraint).setMaxLinMotorForce(maxLinMotorForce);
        ((SliderConstraint)constraint).setPoweredAngMotor(poweredAngMotor);
        ((SliderConstraint)constraint).setPoweredLinMotor(poweredLinMotor);
        ((SliderConstraint)constraint).setRestitutionDirAng(restitutionDirAng);
        ((SliderConstraint)constraint).setRestitutionDirLin(restitutionDirLin);
        ((SliderConstraint)constraint).setRestitutionLimAng(restitutionLimAng);
        ((SliderConstraint)constraint).setRestitutionLimLin(restitutionLimLin);
        ((SliderConstraint)constraint).setRestitutionOrthoAng(restitutionOrthoAng);
        ((SliderConstraint)constraint).setRestitutionOrthoLin(restitutionOrthoLin);

        ((SliderConstraint)constraint).setSoftnessDirAng(softnessDirAng);
        ((SliderConstraint)constraint).setSoftnessDirLin(softnessDirLin);
        ((SliderConstraint)constraint).setSoftnessLimAng(softnessLimAng);
        ((SliderConstraint)constraint).setSoftnessLimLin(softnessLimLin);
        ((SliderConstraint)constraint).setSoftnessOrthoAng(softnessOrthoAng);
        ((SliderConstraint)constraint).setSoftnessOrthoLin(softnessOrthoLin);

        ((SliderConstraint)constraint).setTargetAngMotorVelocity(targetAngMotorVelicoty);
        ((SliderConstraint)constraint).setTargetLinMotorVelocity(targetLinMotorVelicoty);

        ((SliderConstraint)constraint).setUpperAngLimit(upperAngLimit);
        ((SliderConstraint)constraint).setUpperLinLimit(upperLinLimit);
    }
@param nodeA the body for the A end (not null, alias created)
@param nodeB the body for the B end (not null, alias created)
@param pivotA local translation of the joint connection point in node A
@param pivotB local translation of the joint connection point in node B
@param useLinearReferenceFrameA true&rarr;use body A, false&rarr;use body
B
jme3-jbullet/src/main/java/com/jme3/bullet/joints/SliderJoint.java