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?
asked Jan 27 '15 at 04:24 PM in C++ Programming
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
Follow this question
Once you sign in you will be able to subscribe for any updates here