Categories
Uncategorized

PhysX Tip

I lost an hour because of inadequate documentation regarding how to update the simulation in PhysX. Here is a tip: If your objects just won’t move, it’s probably because you are only calling physicsScene->simulate. For reasons which are not explained, you have to call: physicsScene->fetchResults then update your inputs then call physicsScene->simulate((float)(elapsedTimeMS)*0.001f); physicsScene->flushStream();

I lost an hour because of inadequate documentation regarding how to update the simulation in PhysX. Here is a tip:

If your objects just won’t move, it’s probably because you are only calling physicsScene->simulate. For reasons which are not explained, you have to call:


physicsScene->fetchResults

then update your inputs

then call


physicsScene->simulate((float)(elapsedTimeMS)*0.001f);
physicsScene->flushStream();

Leave a Reply

Your email address will not be published. Required fields are marked *