Cap box<->box collisions.
PiperOrigin-RevId: 923312868 Change-Id: I801d76cf1d1d7b9ed1535d3e3c723a5e8af4162a
This commit is contained in:
committed by
Copybara-Service
parent
46d2405b42
commit
c7d340be4f
@@ -1402,13 +1402,15 @@ int mjc_BoxBox(const mjModel* m, mjData* d, mjPreContact* con, int g1, int g2, m
|
||||
}
|
||||
|
||||
// consolidate good
|
||||
int i = 0;
|
||||
int ncon = 0;
|
||||
for (int j=0; j < num; j++) {
|
||||
if (dupe[j] == 0) {
|
||||
con[i] = tmp[j];
|
||||
i++;
|
||||
con[ncon++] = tmp[j];
|
||||
if (ncon >= 8) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
return ncon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user