Properly achieving determinism (on same machine)

Post Reply
anascim
Posts: 2
Joined: Tue Feb 07, 2023 8:45 pm

Properly achieving determinism (on same machine)

Post by anascim »

I'm working on a networked game so I need totally deterministic simulations even when resetting a given physics state (transform + velocities).
However, to achieve determinism, I currently have to delete all rigidbodies and recreate them, which is a bit slow.
It appears that something about the rigidbodies is cached from the previous frame but I couldn't figure it out.
Things that I already tried and failed the determinism test:
- calling resetPool on the broadphase
- calling refreshBroadphaseProxy for every collision object
- calling cleanProxyFromPairs passing each collision object
- calling reset on the constraint solver
- disabling warmstaring on the m_solverMode

Is there nothing else I can do to make deterministic simulations on reset? Or do I really have to delete everything and recreate?
anascim
Posts: 2
Joined: Tue Feb 07, 2023 8:45 pm

Re: Properly achieving determinism (on same machine)

Post by anascim »

Some more things I tried:
- m_deterministicOverlappingPairs = true;
- performDiscreteCollisionDetection()

Keep in mind, I tried all these configurations together and different combinations of them
Post Reply