Taking control of the NxOgre Render Cycle

jchmack

24-09-2007 14:58:27

I'm trying to fix the problem with a shaky/jittery camera when it is attached to a character.

I believe that the problem might be in the order of execution per frame.

from what i see the order currently is:

move target
adjust camera
NxOgre Simulate(which moves the character)
Ogre Render

when i need it to be:

move target
NxOgre Simulate(which moves the character)
adjust camera
Ogre Render

If i want to take control of when NxOgre simulates. Can i just remove the world framelistener and call world::simulate myself when i want?

jchmack

24-09-2007 14:59:55

never mind i didn't read about the framelistener:no in params;

but stuff is going all funky am i doing this right:

create:
mWorld = new World("FrameListener: No, Log: HTML");

then call:
mWorld->simulate(Time);

betajaen

24-09-2007 15:04:49

Almost:

mWorld->getPhysXDriver()->simulate(time);
mWorld->getPhysXDriver()->render(time);

jchmack

24-09-2007 15:11:50

Almost:

mWorld->getPhysXDriver()->simulate(time);
mWorld->getPhysXDriver()->render(time);


ah thx =) may i ask what the difference between render/simulate is? In particular which one the characters are moved in?

betajaen

24-09-2007 16:06:25

Simulate; tells PhysX to go ahead and calculate the scene.
Render; tells Ogre to go ahead and move what happened in the scene.

Characters are moved in simulate, but can only be shown on the screen that they've moved in render.