Cleanly exit Panda3D

Hi there,

I’m kindda new to panda3d.

Here is how I use panda :
My mainloop is controlled by Twisted (networking lib). Twisted calls my game_status_update method every “tick” and my game_status_update method calls Panda’s taskMgr.step() method.

Everything works fine (networkin, game update and panda).

The issue is on the exit. I made my panda World accept the ‘escape’ event and bound a method to it.

This method does : put the game in a “closing” state, close the network connection and it should close panda’s rendering to.

So my question is : how do I stop the panda processing cleanly ?

Thanks for your answers

Tiens un panda toulousain :slight_smile:

Hmm. You might want to try base.taskMgr.stop() or base.closeWindow( or base.userExit(), or a combination of those.

The standard Python call to sys.exit() is supposed to shut everything down and cleanly exit.