@Override
    public void onAnalog(String binding, float value, float tpf) {
        if (binding.equals("Lefts")) {
            joint.enableMotor(true, 1, .1f);
        } else if (binding.equals("Rights")) {
            joint.enableMotor(true, -1, .1f);
        } else if (binding.equals("Space")) {
            joint.enableMotor(false, 0, 0);
        }
    }
Tests attaching ghost nodes to physics nodes via the scene graph
@author normenhansen
jme3-examples/src/main/java/jme3test/bullet/TestAttachGhostObject.java