Closed jrouwe closed 5 months ago
Issues
0 New issues
2 Accepted issues
Measures
0 Security Hotspots
69.1% Coverage on New Code
0.0% Duplication on New Code
I haven't had time to dive into why exactly yet, but just as a heads up, I am seeing some type of regression from this change.
Before:
https://github.com/jrouwe/JoltPhysics/assets/4884246/6dd56b0f-feee-4f89-8afb-930f7ab72997
After:
https://github.com/jrouwe/JoltPhysics/assets/4884246/5bfcb7ec-5fa8-49ec-97bb-348cfd4dff0d
Everything is obviously fine in your samples though, so I'm guessing it's gonna be something funky on my end.
Given that it seems to mostly affect the soft bodies with kinematic vertices I'm guessing it's going to be related to that somehow.
Can you give me that scene?
Sure, here it is: SoftBody.zip
I've omitted the addons
folder.
You'll see some errors about "undefined behavior for SoftBody3D", but those are unrelated and have been fixed in Godot 4.3.
Hmmm, I can reproduce the issue but I have no idea why yet. I'll look at it some more tomorrow.
B.t.w. the issue seems to go away if I change:
const float stiffness = MAX(Math::pow(stiffness_coefficient, 3.0f) * 1000000.0f, 0.000001f);
to
const float stiffness = MAX(Math::pow(stiffness_coefficient, 3.0f) * 100000.0f, 0.000001f);
The order of constraint evaluation has changed by the change you mentioned.
This makes the soft body simulation 10-20% faster and also enables multithreading LRA, bend and volume constraints.