- Home /
How do I make parts of a boss's armor fall off?
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.
Answer by jmgek · Jan 01, 2015 at 07:57 PM
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)
{
ArmorFallOffAnimation(this.gameobject);
}
With that kind of code you can pass what ever gameobject to fall off animation and don't destroy it.
Your answer
Follow this Question
Related Questions
Imported 3D models collisions 1 Answer
2d Character physics? 1 Answer
Player falls through Curved Mesh Colliders 1 Answer
frame rate breaks physics 1 Answer
Capsule Collider Moving Through Terrain 0 Answers