Even if I were to use several collision volumes per model they would be invalidated the minute the unit rotated its torso. What's needed here is per-piece or even per-face collisions that can follow unit animations.
Performance-wise you wouldn't enable this for every unit, only those chosen by the mod. In my mod there would never be more than 30 or so super units on an entire map. I see the algorithm being something like:
Code: Select all
if (model->Collides(projectile)) {
for (piece in model) {
if (piece->Collides(projectile)) {
for (mesh in piece) {
if (mesh->Collides(projectile)) {
return true;
}
}
}
}
}