Problem while switching to 2.7.2

daedar

24-07-2007 12:00:42

Hi,

I don't know why, and if someone has already experienced the problem but since I've installed the 2.7.2, I've got problems with my actors and bodies.

They're sleeping when added to the scene, I have to call wakeup() on all my bodies, vehicles etc... so that the physic engine affects them.

Strange isn't it?

So if someone has an idea, maybe changing the time before an actor is put to sleep could work?

Thx

Daedar

betajaen

24-07-2007 16:48:47

PhysX Linux?

vinvin

24-07-2007 17:03:38

no, Windows.

betajaen

24-07-2007 18:12:54

Anything special of the Scene or World?

daedar

24-07-2007 18:58:54

nxWorld = new NxOgre::World("FrameListener: Yes, log: html");
nxScene = nxWorld->createScene("Main", mSceneMgr, "gravity: yes, floor: no, default-material-restitution: 0.25, default-material-dynamic-friction: 0.7, default-material-static-friction: 0.7, time-step-method: variable");
#ifdef _WIN32
nxWorld->getPhysXDriver()->getSDK()->getFoundationSDK().getRemoteDebugger()->connect("127.0.0.1");
if( nxWorld->getPhysXDriver()->getRemoteDebuggerConnection() )
nxWorld->getPhysXDriver()->getRemoteDebuggerConnection()->addCamera(mSceneMgr->getCamera("PlayerCam"));
#endif

betajaen

24-07-2007 19:08:11

Change to a fixed timestep and see what happens.

daedar

24-07-2007 19:34:14

you're right betajaen, it works well with a fixed timestamp... but with a fixed timestamp, physics runs very slow and not smoothly. Variable timestamp is far more acceptable.

betajaen

24-07-2007 20:36:12

Fixed runs at 60 frames per second, it's designed to work with VSync. It's pretty much the default of NxOgre, and I always use it.


Obviously variable works at x frames per second. If it's sleeping like that you should take it up with Ageia.

daedar

25-07-2007 00:50:02

Ok thanks betajaen, I'll try to post a topic on Ageia's forums...

Just a last question about that, can we set the delay before an actor is put to sleep?

BloodyFanatic

25-07-2007 11:03:44

Fixed runs at 60 frames per second, it's designed to work with VSync. It's pretty much the default of NxOgre, and I always use it.

how does this work with vsync when it's fixed at 60 fps ? my big old screen refreshes at 100 Hz, so vsync would be 100 fps in this case. but it isn't ;)

luis

25-07-2007 12:52:09

I have the same problem with variable method.
I think it is because when you load and create your objects (a big heightmap plus some boxes and vehicles in my case) it takes some seconds to load, then when you call (or the framelistener do) the simulate method the elapsed time is too big and the objects are slept.

I think one solution could be use your own framelistener to update physics and clamp the elapsed time to a maximum value.....
I didnt tried it yet....


Just a last question about that, can we set the delay before an actor is put to sleep?
yes, see the wakeup method.

how does this work with vsync when it's fixed at 60 fps ? my big old screen refreshes at 100 Hz, so vsync would be 100 fps in this case. but it isn't
in window mode it should run at 100Hz (if you graphics card can handle the scene).

BloodyFanatic

25-07-2007 22:52:34

in window mode it should run at 100Hz (if you graphics card can handle the scene).

of course it can handle the scene, but the physics are updated at 60 Hz rate. it's not a problem for me since i use custom fixed update rates, but shouldn't it update at the same rate as graphics with vsync on? i think, yes, it should to be "designed to work with vsync" :roll: