The easiest way to swap parts of an animated model is to create a single model that has all parts, and then simply find and hide (or stash) the parts that you don’t want.
This system works well as long as you don’t have thousands of parts. At some point, you have to go to the more complex system of loading the parts individually and parenting them in. But since this alternate solution is more difficult, I can’t see any reason to recommend pursuing it unless you have to.
Well what about the “complex system?” Because when there are like 20 different characters in game and I hide all the parts so I result in 1 complete character, all the other parts will ask their toll to the processor so I might be interested in the difficult approach even if I takes some tries.
Well static meshes do appear well when parenting them for exmpl a hat to the head. But I can’t do that with an animated torso can I?
When you hide a part, it doesn’t animate, and doesn’t cost any processor time. So even if you have to hide 20 parts, or 200, it’s still a good solution just to hide the parts that aren’t being used. The only reason to avoid this solution is if it gets too difficult to manage the source model with all of the parts in it.
If you insist on loading the animated parts from separate model files, you can use the Actor’s multipart system to do this. This means calling actor.loadModel() repeatedly with the different part names as needed. Since all of your parts have the same skeleton, you don’t need to use the attachToNode() solution to stack up different parts to each other; you can just leave them all at the root, which is much simpler.
However, with this second solution, you do pay a runtime performance penalty, because each of your separate models now has its own copy of the skeleton, instead of a single skeleton like you have with the one-file solution. This means the skeleton has to get computed multiple times, once for each model. You can avoid this cost by passing mergeLODBundles = True to the Actor constructor, which tells the Actor to attempt to unify all the skeletons into a single skeleton. This is where it starts to get complicated. With luck, the Actor interface will handle all the complexity for you, and you won’t have to think about it.
If the parts to be added are rigid, like different shields for example, can you simply parent them to the skeleton? It sounds like the method you describe is only necessary for skinned parts of the model (so like different arms for example.)
Of course I’m planning to use something like that to but it’s only a matter of parenting and positioning. Thats why I won’t model like hats and such to it and rigg it with the model lol that would be stupid
Ty all for your help ;D now I can continue my project… after the lame and hard exam period out here -__-"…