[Solved] Resetting World

azurerayn

01-12-2007 07:10:52

I just downloaded the latest version of NxOgre and PhysX.

I'm working on a game with several game states using a game state manager (using Ogre, PhysX and NxOgre of course ^^)

I have some questions about the following information I got from other posts in the forum while looking for help:

- World is a singleton

I want to be able to retrieve the pointer for World in my states. However, there is no World::getSingleton() capability as we have for Root in Ogre. Is there anyway simple way to get an instance of World in any state of my game?

- World has a reset() capability

I would like to reset the World when I enter a new state. However, that function seems to have vanished from the definitions. How do I reset World then; would it be by destroying all its states?

betajaen

01-12-2007 09:14:24

I think your getting confused with an old version of NxOgre; World isn't a singleton. To reset it's state, all you need to do is delete every scene.


Read my shortguide

azurerayn

01-12-2007 21:16:31

ahhh! I see.

That sure clears up everything :D

Thanks a lot betajaen!