Download

[Video] Destructible Physics Combinations That Partition into Physics SubGroups!

Dear Community,

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!

https://youtube.com/watch?v=sOl5uKe16ZM

Rama

bump, enjoy the video!

Rama

Why is this in this section? Isnt this a showcase or something? (unless you provide source)
Nice work though.Keep it up

Bump Enjoy the video!

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.

Dear Bajee,

Your method sounds like it would be even better if you can pull it off, please let me know how far you get with it!

I explain all the details of how I got all the meshes to stay connected without jiggling here:

https://forums.unrealengine.com/showthread.php?1832-Video-Dynamically-Combine-Meshes-In-game-to-form-new-composite-Physics-Shapes!

Regarding your idea:

I suppose you could make a custom component and keep adding the AggGeom of each of the actors to be joined to the main actor’s AggGeom!

So the AggGeom of the root actor is literally the Aggregate Geometry of all of the attached actors :slight_smile:

Then you would update the physics and that should work!

I suppose you would then do an actor Attach to the root component and turn off the collision for all of the attached meshes :slight_smile:

To detach the actors you’d have a backup of the root actors original AggGeom and just clear existing.

This solution would not involve any physics constraints.

Let me know what you discover!

Rama

PS: See SphereComponent.cpp for example of using AggGeom

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.

Well, it seems like Epic has this feature on their todo list:

Will be interesting to see their solution.

Oh wow! Great find!

I look forward to seeing that happen!

:slight_smile:

Rama

Wiki Tutorial

Bumping this video (see original post) for your entertainment! I also have a wiki tutorial on how to make runtime physics constraints here:

Create Runtime Physics Constraints