Download

Modular player mesh

Hello :slight_smile:

I’d like to create a game where the player is a modular robot – pick amongst different bases, and then attach other modules onto the base’s attachment point(s), and onto the attachment point(s) of the models, and so on. For instance, imagine there might be a base on wheels and a base on legs, both of which can attach one module to the top. Then, there might be different “torsos” that can attach to the top of that base, and different torsos might support different numbers of tools attached in different places. So, multiple levels of meshes attached to meshes, hierarchically. If the torso rotates with respect to the base, then all of the tools attached to it rotate as well.

Where might I start for creating such a system?

I have done a little bit of experimenting, importing skeletal meshes for a base and a torso and trying to hook them up using the “AttachToActor” Blueprint command. I created a class for the Torso, gave it a skeletal mesh and assigned it the mesh I had created. Then, I fed a SpawnActor Torso into the Target of AttachToActor and a Self into the Parent Actor. This does not work, though, with a message that the TopDownCharacter cannot be attached to itself. This isn’t terribly surprising to me, though, since I began my journey with Unreal Engine just earlier today. I have a great deal to learn :slight_smile: (I am a systems developer in my day job, so I have a pretty good understanding of programming, but that is of course only the tiniest part of using Unreal Engine to build content.)

So, pointers on what to delve into, if it’s possible to do what I’m looking for here, would be greatly appreciated.

I did wonder whether the concept of weapons being attached to players might be helpful here, but I don’t know if a weapon can have a weapon of its own. :stuck_out_tongue:

Thanks very much,

-logic

For 3D side… Make a Rig, Skeleton and your seperate meshes, then weight them to the Rig. Dont Forget to create a unweighted root bone.

Then Import one of the Meshes with the skinned rig into UE4 with the option “no rig”. Ue4 make you a rig. Name it.
Then Import the rigged modular parts into the engine with the new rig and it will fit.
For using modular a character make a Blueprint and use “Master Pose component” its very simple.

Thanks very much, I’ll look into the Set Master Pose Component action. :slight_smile:

To confirm, though, I don’t immediately see a way to “attach” one rig to another (as sort of a “sub-rig”). Does this mean that the character’s rig must be able to represent all possible modular configurations, and then the parts of the rig that don’t have a modular part attached to them simply don’t do anything?? If I’m understanding correctly, the various modular parts will each map to only part of the rig, and the Set Master Pose Component action allows them to be combined to create a sort of “compound” mesh associated with that one skeleton?

Its the same as rigging a complete Charakter. You always weighted charakter parts not completely to a rig… just the groups are painted to the Skeleton …the Arm is rigged to the upper arm bone etc. The same with single bodyparts. the Pivot Point is the important thing. All parts must been set to the same Pivot (At Center between the feet, same place as root bone.) You rig the part to the complete skeleton, in this case to the upper arm bone. Unused Groups get also empty as by a complete character.,thats all… The master pose component do the same as the join meshes in your 3D Software but with the possibility to change your parts very comfortable per drag and drop. Yu can add bones to These rig as you want. Important is that the mesh includes all the groups of your rig+ additional bone. you can also use Sockets.
Regards Michael