In this video I am demoing the technology I’ve developed to enable runtime / gametime combining of physics meshes into larger physics units.
**Physics SubGroups**
These larger physics units can be destroyed, and will automatically partition into realistic subgroups that separate and act as physics subgroups of the original larger unit!
This was a lot of C++ work :)
Again the point is that this can all be done at runtime by the user, making any kind of combinations you want, changing them any time you want!
This adds a new layer of destructibility and physics entertainment!
Enjoy!
?v=sOl5uKe16ZM
Rama
Would you mind explaining a little bit how you did this? I’m trying to achieve a similar effect. Are you using constraints (as in one of your earlier videos)? I was thinking about doing it a little bit differently (not implemented yet):
Create an AActor subclass, let’s say ABuilding, with a custom UShapeComponent as its root component. This UShapeComponent would be able to update its physics body at runtime. As far as I can tell, from reading the engine code, this should be possible. So when you want to glue a new object to the building, it would take the new object’s physics shape, add it to its root shape component and attach the object to it. This way you have no jiggly physics constraints.
I’m still playing around with this idea. The way you described it is pretty much what I had in mind. Currently, I’m unsure thought, how you could handle collision on a per body base. Just like in your video, it would be nice to be able to respond to collision for each of the subobjects separately. Unfortunately the collision handler methods I know if (ReceiveHit) doesn’t seem to contain information about what physics body actually collided. It only contains the component, which in this case would always be the same root shape component.