In terms of item pickups, is it better for the item to have a mesh component that directly attaches to the item to the player, or for the player to have a mesh component that gets its mesh set upon pickup?

In my game I would like to have pickup items that can be equipped to the players hands. In my current system, when a pickup class is interacted with, it spawns the item (which has no mesh component, just a reference to the mesh that should spawn in the players hands) and then sets a static mesh component that is part of the player. Is this the wrong way to go about doing this?

The alternative would be to have the item itself have a mesh and attach that directly to the player. I think this makes more sense, but I am not sure if this is the way to go since it would mean adding extra meshes since I would need one for each equipped item rather than just having one interchangeable one.

I have seen this be done both ways in online tutorials so I am uncertain as to which is better long term.

I tried to figure this out for a beat em up. What you tend to do is make a socket in one of the hands and attach to that socket. But I ran into problems with that later on. What I ended up doing was having an item on the ground. And have the characters do their kneel down and grab and then destroy the one on the ground while simultaneously spawning the same item in the hand at the socket.

  • Forgot to mention that the sockets allow you to scale and position the item properly so when it is attached it looks right.