Default flex internal contacts to "false".

This function is unusual in the context of soft body simulations and has been a common gotcha for users, see e.g. #2500, #2079, #1900, and #1433. It should be used only if element inversion cannot be prevented otherwise.

PiperOrigin-RevId: 736822983
Change-Id: I76b0965c91c94dd88123826d218d7544ec37a88c
This commit is contained in:
Alessio Quaglino
2025-03-14 04:54:12 -07:00
committed by Copybara-Service
parent 40891eeadc
commit f25fc63f0f
4 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ void mjs_defaultFlex(mjsFlex* flex) {
// set other defaults
flex->dim = 2;
flex->radius = 0.005;
flex->internal = 1;
flex->internal = 0;
flex->selfcollide = mjFLEXSELF_AUTO;
flex->activelayers = 1;
flex->rgba[0] = flex->rgba[1] = flex->rgba[2] = 0.5f;