I am making a game that has a large snake-like boss in it that has several sections of armor along it’s body. I wanted to know how I could make each piece of armor have it’s own individual health and be able to break in two (I also would like them to fall to the ground and interact with the ground and be obstacles for the player, I don’t just want them to miraculously disappear, otherwise this problem would be easy to solve). I have no idea how I could make the hitboxes for the armor always stay in the same spot either because the boss will be animated.
I would just connect the armor with a joint to the snake, or child it to the game object. Set up a simple box collider and then animate them to fall off when they reach any health
if(armor1 < 0f)
With that kind of code you can pass what ever gameobject to fall off animation and don’t destroy it.