[Bug with Fix] Physx Constraints Randomly breaking at spawn

FConstraintInstance doesn’t initialize bLinearBreakable and bAngularBreakable in it’s construcotr, therefor it randomly switches between true or false, depending on what is written to that memory cell, resulting in Constraints not working consistantly (eg almost never / randomly) in C++.

How comes nobody ever noticed that before?

While those variables are not initialized in the constructor, they are initialized in the header file. Could you provide the location of exactly where you see the values switching between true and false? Thank you.

Have a great day,

Sean Flint

I see, you use bitfield packing. But it doesn’t seem to work.
Well I see them switching in their variable-values, when I read them after creatin. Also visible in the editor when the constraint-component is selected in ejected mode. Exact same setup (3 clicks, same actors, same settings, deterministic in 100%) always lead to different values in there. As soon as I set the booleans to true / false manuallyy afterwards they won’t cause this behaviour anymore, no matter where I initialize them.

Could you provide steps for setting up your constraint so that we can perform the same tests on our end. Or could you provide a sample project that is set up and shows the error occurring? In order to verify this issue, we need to reproduce it on our end. Thank you.

Have a great day,

Sean Flint

Hello ,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If you are still experiencing your issue, please do not hesitate to respond to this post. For any new issues, please create a new Answerhub topic.

Have a great day,

Sean Flint