Manually Updating NxOgre and debugRenderer

Zach Griffin

21-02-2009 06:22:36

I started integrating NxOgre yesterday after having used newton for 4 years so forgive the lack of knowledge of PhysX I'm about to show. I've searched on the forums for most of it but haven't found a wiki or any detailed guide apart from the unfinished nxogre.org shortguide

I have a PhysicsManager class that looks after all the physics and controls things like the timestep so I need to update NxOgre manually. When I create the world I am specifying: mWorld = new NxOgre::World("FrameListener: no, time-controller-none")

so I can control the timestep and run it in a seperate thread. The main scene I am creating with parameters:

mWorld->createScene("KaizenScene", "gravity: yes, floor: no, renderer: ogre, controller: accumulator")

What do the renderer: ogre and controller: accumulator parameters do apart from the obvious? What other types of controllers are there?

I call the functions:

mWorld->simulate(mElapsed);
mWorld->render(mElapsed);


to step through the simulation which from looking at the VRD is working correctly.

I also create the debugRenderer with:
mWorld->CreateDebugRenderer(mSceneManager);

However, the graphics aren't drawn when I don't use a time-controller. How do I update the debugRenderer manually as well? If I used the time-controller: ogre parameter it works but it isn't suitable for our purposes.

Finally is there any other function that should be called when manually updating the world or do I have it right?

Any help is much appreciated!