@Override
    public void update(float tpf) {
        super.update(tpf);
        if (debugEnabled && debugAppState == null && pSpace != null) {
            debugAppState = new BulletDebugAppState(pSpace);
            stateManager.attach(debugAppState);
        } else if (!debugEnabled && debugAppState != null) {
            stateManager.detach(debugAppState);
            debugAppState = null;
        }
        if (!active) {
            return;
        }
        pSpace.distributeEvents();
        this.tpf = tpf;
    }
Update this state prior to rendering. Should be invoked only by a
subclass or by the AppStateManager. Invoked once per frame, provided the
state is attached and enabled.

@param tpf the time interval between frames (in seconds, &ge;0)
jme3-jbullet/src/main/java/com/jme3/bullet/BulletAppState.java