Remove compound mesh child material limit. (#172)

This commit is contained in:
Erin Catto 2026-09-25 14:56:44 -07:00 • committed by GitHub
commit 5643cd81ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 314 additions and 58 deletions

View file

@ -545,6 +545,7 @@ public:
assert( capsuleIndex < capsuleCapacity );
capsules[capsuleIndex].capsule = { p1, p2, radius };
capsules[capsuleIndex].material = material;
capsules[capsuleIndex].material.userMaterialId = 1;
capsuleIndex += 1;
}
else
@ -552,6 +553,7 @@ public:
assert( sphereIndex < capsuleCapacity );
spheres[sphereIndex].sphere = { p1, radius };
spheres[sphereIndex].material = material;
spheres[sphereIndex].material.userMaterialId = 2;
sphereIndex += 1;
}
}
@ -559,6 +561,7 @@ public:
hulls[hullIndex].hull = &box.base;
hulls[hullIndex].transform = transform;
hulls[hullIndex].material = material;
hulls[hullIndex].material.userMaterialId = 3;
hullIndex += 1;
}