- Home /
Buildable objects
Hello, I want to make a game where a user can build certain objects with parts or pieces and when they make it and place it in their level if they shoot from a bazooka or damage it with an explosion or collision the object would fall apart into the pieces it's made of. Thanks in advance.
Answer by AnXgotta · Aug 12, 2012 at 04:44 AM
This question is HUUUGE. Just to get you going in the right direction...
Lets say you want to make a hammer out of a stick and a metal rectangle. They are in two separate pieces to start. The player clicks and drags the stick toward the metal rectangle. The stick could have a trigger on the tip of it. The metal rectangle could have a trigger on the center edge where the stick would go. When the player releases the stick to put them together you could do a check to see if the triggers have collided and do the checks to see if the parts match and if so, lock them together. Child one on the other or use a joint of some sort.
Hopefully this is a bit helpful in giving you an idea of where to go with this.
For the damage effects you could then do damage checks on the parts or joints (which have max flexibility) and you can un-child the objects from each other or remove the joint and apply explosive forces or whatever you want to them.
This is one example of the very many ways to do this.
Edit: I may have over thought what you were trying to do.
Answer by AlexanderTh4682 · Aug 12, 2012 at 05:59 PM
Ok thanks! But is there a way it make it non-wobly?
Your answer
Follow this Question
Related Questions
Buildable objects 0 Answers
Buildable parts 0 Answers
Assets Question 0 Answers
AEO Style Wall Building 0 Answers
How do I alter all children of a gameobject at once? 1 Answer