Stopping Newton FrameListener

kintaro

12-06-2006 15:44:01

Hi, I am building an application that uses OgreNewt and oFusion (oSceneLoader). My problem is that when I change scene, OgreNewt::BasicFrameListener gives an error and my application crashes, even if I didn't created any primitive solid of physics.

I noticed that if I create the OgreNewt::BasicFrameListener only after change scene, everything works ok, but I need to use physics in both scenes.

So how could I solve this problem?

I thought that if I stop ogre newt basic framelistener, change scene, and than re-initiaze this frame listener, maybe it can work. But I don't know how to stop a frame listener or re-initialize one. Anyone knows how to do this?

Thanks for help

walaber

12-06-2006 21:50:43

probably because reloading the scene changes the camera for the scene (and possibly the scenemanager). you should just update the physics in your own frame listener I think!

you can copy the update code from BasicFrameListener, if you need to.

kintaro

14-06-2006 19:37:43

Thanks a lot walaber.