Can't Change Root Component Type

Hi, I’ve been having a problem for a while that I can’t find a way to resolve on my own, and haven’t seen anything on the forums that adequately addressed it.

I use a parent class (item_carryable) which contains the logic for items in my game (which is the vast majority of objects that aren’t static in the map) so that you can pick them up, attach them to your character, and so forth. The item_carryable class has uses a Static Mesh as a root. Whenever I make new items derived from it, I just change the model in the field and it works fine.

However, I have a number of items (bags, furs, etc) that I need to be skeletal meshes. Unfortunately, there is no way that I can find to change the type of the root component from Static Mesh to Skeletal Mesh for the child.
This becomes a problem because then I have to make the skeletal mesh be a sub-component of the Static Mesh root which is, well, nothing. This means I can’t enable or disable physics in any way that doesn’t break the whole thing - if I enable physics on the static mesh, it’s an empty component that does nothing except maybe fall through the world. If I enable physics on the skeletal mesh sub-component, it immediately becomes separated from the actor it belongs to, because it detaches from the root, which leads to more bullcrap down the road.

The aforementioned reason is also why I can’t use a Scene Component as the root, for example, because that can’t handle physics properly. Is there any way that one change the root mesh from the static to the skeletal, either in the editor or in blueprints? If there is a C++ way, I’m also open to hearing it

Thanks

Answering question live: Twitch

So, without knowing how many children you have. You can easily just keep the StaticMesh as the root, set physics to it (have to assign a mesh), use THAT to move, while keeping it Hidden In game. The Skeletal Mesh will move along with it. Just tested it and that works.

If not, you have to redesign your whole system from scratch.

you could make ItemCarryable into an interface, then make 2 pickup actors that implement that interface: ItemStatic and ItemSkeletal. then any communication you would normally do with the base class, can be done through ItemCarryable interface functions.

then, if you decide you want to carry a character or a vehicle as if it were a weapon, you can just let them implement ItemCarryable.

Hey guys thanks for the responses, sorry I was busy and forgot to check the responses on here.

I did think about doing that system of creating a static base that is hidden with a skeletal model on top of it, and may end up using that - though I wonder if there would be any additional performance costs to having 2x the number of props in those cases? Probably not enough to be a big concern though.

Also making 2 actors that implement the same interface may be a good approach. I’ll try both of those out and see if they are going to be what I’m looking for. Thanks again guys