WeldTo() without attaching actors

It is possible to WeldTo two rigid bodies to act as one without attaching them?
I need to create multi element structure of blocks (voxels) and I need to act them as one. The problem is when I use WeldTo() for this, I can attach one actor only to one parent, and it not suite my case, because I need to weld to all surrounding voxels. Anyone know solution?

I think about writing custom WeldTo but I didn’t work with UE4 source code before and I don’t know how difficult it will be?

Are you trying to weld one actor to multiple actors? Is this needed because you want some special hierarchy or because you’re trying to make a big compound object? If you’re just trying to make a big object you could just keep welding actors together.

It sounds like you want something more custom. You will probably want to write your own component which handles this and you can make use of the existing welding code in FBodyInstance.

If you’re trying to weld many many voxels together you will probably want an actual system for handling this instead of making a component for each voxel. The destruction code works in this way. A single destructible component is responsible for many destructible chunks. Under the hood it creates a single PhysX actor for each moving piece and as you break off objects it spawns more actors as needed.

Hope that helps

Thank you for help, but I have more questions :smiley:
What do you think about Runtime Mesh Generation for that? I am not sure how handle now block positioning in that case. For example when Trace hit mesh I will recive impact point and impact normal, it will me it will me general spot to spawn but not precise space.

Second problem is how to hanlde collision if I have on large collider for whole object, so I dont know what part on body need to destroy on collision

My target is to make something similar to game: Space Engineers.