How can I recreate tank spalling in my game?

Hello all,

Today, an idea sparked into my mind and I wanted to create a tank simulator similar to War Thunder. I have already started out with the Physics Tank Maker asset from the asset store, but there is one thing that I can’t seem to get.

In games like War Thunder, there isn’t a HP system or Hit Points. There are modules (like engines and crew members) that you have to destroy to knock out a tank. And the way it happens is when the bullet hits the armor, it will break up into bits and pieces called spall or shrapnel. These hunks of metal are what actually do the damage to the insides of the tank(if the bullet was able to go through the armor). I found this YouTube video showing a simulation of a bullet going through armor:

The problem is I don't know how to implement this to my game. Should I use unity's physics engine or raycast? And how would I?

Edit: I figured it out, you can check it out on my youtube:Aj8841 - YouTube

I probably wont release ALL the code until it is worthy of selling and once I decided how much it is worth.

1 Answer

1

Having shrapnel fly around inside the tank to determine how damage is dealt to the inside seems overcomplicated for a game. What I would do is have different colliders on the outside of the tank; and each collider is mapped to an inside element of the tank. E.g. if you hit the collider at the back of the tank, the engine will be damaged, and if you hit the collider around the middle it will hit a crew member.