I see. I wonder if increasing on-center repulsion range (to leave free self-alignment rotation) could have been a way out of that. Btw, I noticed that in your code you mention "a circular body is always struck through its centre", I guess this is some non-physical simplification since you might care more about just rotating elongated objects?
If you've ever played with the militia in AoE III, you'll know that they're only there to raise a defense army very quickly and they die easily.
It's the same here.
https://ageofempires.fandom.com/wiki/Militiaman
not sure if it is finished or ready, but it might be a good idea to implement some way for animations to play depending on motion at the time of death.
But right now a collision is only detected once for a pair. I imagine this idea would require to do two.
I did a quick attempt for ellipse. It wasn't going in the right direction so I dropped it. Thinking about it I think I can explain why it's a bad idea : ellipses are too good to tile up a given space regardless of if the shapes are aligned or not, creating interlocking patterns.
A drawing not at all accurate but to give the idea :
For the same area, the ellipses can compress easier regardless of orientation. Whereas the rectangles force a spacing. And there corner impacts actually helps keep it that way.
Really? Where can I get it?
if you have a handle on if a unit dies while experiencing force (ie elephant strike or siege weapon), I wonder if one of @Alexandermb's new infantry death animations could be used.
There is one where the unit gets knocked backwards off its feet, could be very cinematic.