[Git] How to implement intentional slowmotion/fastforward?

retsam

09-02-2010 12:38:42

I tried and tried and then I only found some posts about this from the year 2000 or less.

I'm thinking of implementing that over the top matrix like bullet-time slowmotion.
In animation and rendering, it's easy just by having a additional variable for delta time but how can it be passed on to physX via NxOgre? Is this even possible? I've only used NxOgre from the current Git version and all the old posts with the old bleeding version code did only manage to make this even more confusing.

I know at this point that it is not any of these:

//I believe this is what it used to be back in the 00's
mWorld->simulate(deltatime);

//This one didn't even bother to crash even when I passed a negative value :O
mTimeController->advance(deltatime);


I'm looking into sceneDescriptions now but otherwise I've no idea what to look next. Loop through all my physical bodies and set gravity and velocities according to my own deltatime?

betajaen

09-02-2010 13:47:04

I don't like things crashing over trivial values.

Anyway, I can add a time modifier if you like. But surely doing "deltaTime * 0.5" slows it down?

retsam

09-02-2010 14:29:09

I tried all kinds of values from -1 to at least 1000 to put with TimeController->advance(deltatime);
Nothing changed the physics simulation speed. I have to check this on another computer just to make sure it is not a hardware(or lack of) thing again...

betajaen

09-02-2010 15:30:12

Okay, I just looked in the source for you.

- BloodyMess ignores the deltaTime value (It has it's own timer).
- Detritus uses what you give.

You should upgrade to Detritus.

retsam

09-02-2010 19:27:30

Alright, thanks. Just compiled it and now trying to fix the code for it.

meanwhile... what's up with NxCooking.lib?
The latest PhysX SDK has only PhysXCooking.lib which I've used after getting errors from missing libs.
Is it just a wonky renaming from physx side or should I be concerned? I'm a total newb with PhysX, so I wouldn't know about these things.

betajaen

09-02-2010 19:46:26

No idea. I'm still on 2.8.1