Armor penetration system

Hello everybody I am beginner of Unity3D. I play men of war and world of tank. They both have Armor penetration system. How to simulate the system in the Unity3D.
Following is my opinion.

1.Define the armor value for the face (I have no idea how to do on this step)
2.Define the armor penetration for the bullet
3.Define the angle between the face and bullet
4.Calculate if the face could be penetration or not

sorry for my poor english

Having a script for the Tank that contains the value for the armor and a script in the bullet containing it’s penetration value would be a good start.

Then inside the tank script using it’s OnCollisionEnter function you can test that when a bullet strikes it, the resultant collision object will contain all the details of that collision. So with some calculation you could figure out what angle it hit the face of the tank at and from that get the penetration value of the bullet and do whatever logic you need to determine the result.

Also for quick identification of what hit the tank in the OnCollisionEnter function, use a tag to represent the bullet and you can just use collision.gameObject.tag == “bullet”

Come to think of it, this assumes a bullet is a rigidbody you have created and added a force to. This will act very realistically but due to the physics update steps, it IS possible for a VERY FAST projectile to ‘step’ through a target. So maybe a raycast would be better or a combination of the two or a ‘stepped’ raycast so that bullet drop and travel time are considered.

Good luck!