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?
Properly achieving determinism (on same machine)
-
- Posts: 2
- Joined: Tue Feb 07, 2023 8:45 pm
-
- Posts: 2
- Joined: Tue Feb 07, 2023 8:45 pm
Re: Properly achieving determinism (on same machine)
Some more things I tried:
- m_deterministicOverlappingPairs = true;
- performDiscreteCollisionDetection()
Keep in mind, I tried all these configurations together and different combinations of them
- m_deterministicOverlappingPairs = true;
- performDiscreteCollisionDetection()
Keep in mind, I tried all these configurations together and different combinations of them