How can I break or split objects, e.g. decapitate heads or sever body parts in BGE ?
All I’m asking is a general approach or an idea. I have enough experience on BGE and I won’t need details. Just an idea!
How can I break or split objects, e.g. decapitate heads or sever body parts in BGE ?
All I’m asking is a general approach or an idea. I have enough experience on BGE and I won’t need details. Just an idea!
I once had to made a stone break into pieces. My approach was to have a broken version of the stone in a hidden layer. When I wanted the stone to break, I would delete the original stone and spawn all the pieces in its place. It’s a bit tedious, but it works ok.
BlendingBGE, there’s a little problem with your model. Note that the center of gravity of an object is the same as the object’s center point.
I believe you cut the parts from a grid, and then separated them, so they all have the center gravity in the center of the original grid. Try recalculating the center for the different parts, and you’ll get much better physics.
Nice approach though I’ll need double objects.
One more question.
The main reason I want to seperate objects is to use it for severed body parts in a fight.
So I thought to split the enemy’s mesh into many body parts and remove the parentage of a severed part to the armature to achieve the effect. I’m using removeParent and even though the severed piece becomes independent , it retains the animation of the armature and stays in place doing the animation!
Why does the animations stays since I have removed parentage?
I give you the example blend.
break_object.blend (152 KB)
That’s cool, I see what you mean. It seems like removeParent() isn’t doing all of what it’s supposed to do, or the armature parenting doesn’t depend solely on object parenting once the game is running.
I’m thinking that even if it worked, it wouldn’t look right. The separated object would return to it’s resting position, probably far away from it’s armature.
Maybe you should think about splitting the armature and parenting the different armatures to make a whole body, though I don’t know if that’s possible. Besides that, animating an armature that’s all in pieces can be really terrible.
There’s an easier way to do destructible objects. It’s set up to drop some loot as well. There are some unnecessary faces in the broken pieces (I’ve cleaned them up in a newer version I can’t find at the moment). This technique allows your objects to be moveable and breakable. Press space to fire the arrow and break the jug.
Destruction.blend (684 KB)
3dmedieval, I’m afraid you didn’t read thoroughly.
That’s exactly the trick I do, as I explained before. But as far as I know, that only works for static objects (and it works really good). Now try to put an armature to that.
By the way, really cool stuff what you attached
Thanks and ouch at the same time. Just trying to be helpful…
You don’t have to apologize. Any help or idea is welcome
I think it would be really good to make a finite element mesh version of the object using a mesher like netgen. This could ultimately, after a lot of python, lead to ways of blowing the object into pieces.
Edit: This again would be the same method you have already used (with another layer), but taking it too another level. The object could be made into a mesh of many objects. It would look the same until forces kick in. Can objects be made to attract eachother? If so then this could be the “glue” that holds the mesh together.
I want to achieve something like the deaths in the Krum game:
By the way do you know who is developing Krum so I can ask him how he did it?