@Override
    public void setPhysicsSpace(PhysicsSpace newSpace) {
        if (space == newSpace) {
            return;
        }
        if (added) {
            removePhysics(space);
            added = false;
        }
        if (newSpace != null && isEnabled()) {
            addPhysics(newSpace);
            added = true;
        }
        /*
         * If this control isn't enabled, its physics object will be
         * added to the new space when the control becomes enabled.
         */
        space = newSpace;
    }
If enabled, add this control's physics object to the specified physics
space. If not enabled, alter where the object would be added. The object
is removed from any other space it's in.

@param newSpace where to add, or null to simply remove
jme3-jbullet/src/main/java/com/jme3/bullet/control/AbstractPhysicsControl.java