I’m working on rewind / replay algorithm, but I’ve a problem on simulation.
I’ve created a new World (as we know) that initialize automatically the PhysX scene which I’ll use for rewind / replay process.
After moving the PxActors from the main scene to the new scene, is executed this code that should execute the simulation 10 times:
for (int32 a = 0; a < 10; ++a) {
RRWorld->SetupPhysicsTickFunctions(1.f/60);
RRWorld->GetPhysicsScene()->StartFrame();
RRWorld->GetPhysicsScene()->WaitPhysScenes();
RRWorld->GetPhysicsScene()->EndFrame(nullptr);
}
The problem is on that line RRWorld->GetPhysicsScene()->WaitPhysScenes(); for some reason the execution stop forever. There’s no crash the executions is blocked.
Blu man, how do you execute the simulation?
Do you talked about calling the function PXScene::simulate, So you skip the FPhysScene simulation?
There is something that I’m missing?