NVIDIAGameWorks / PhysX

NVIDIA PhysX SDK
Other
3.2k stars 810 forks source link

[Joints] Broken joints, when removed/re-added to the scene come back unbroken #652

Closed NBG-Juozas closed 1 year ago

NBG-Juozas commented 1 year ago

I've noticed that ScConstraintSim.cpp Sc::ConstraintSim::ConstraintSim(ConstraintCore& core, RigidCore* r0, RigidCore* r1, Scene& scene) :

sets the constraint flags to eBREAKABLE and eCHECK_MAX_FORCE_EXCEEDED, but eBROKEN does not get set, even if the "Core" class has that constraint flag raised.

If the eBROKEN flag is activated here, based on that core instance, then a lot of places trip asserts, since they expect the joint not to be broken.