Character holding a Weapon

Let’s say I have a Character that can hold different types of weapons (pistol, shotgun or sniper).

I’ve built a Blueprint for the Character (BP_Player), and 3 blueprints for the weapons (BP_Pistol, BP_Shotgun and BP_Sniper).

I was thinking about using the “Spawn Actor From Class” node, which would be called every time the player selects a different weapon from the menu.

Is this the right approach?

Depends on the project. It’s not a bad approach. The easy approach is to always have all weapons in the BP but hidden from view. It’s also a silly approach when it comes to overhead.

I would try using a child actor and swapping its class. Not sure if this actually works that way, the child actor’s class may be bound to whatever you set in editor. It’s worth a look though as the child actor is basically your perfect pre-existing place holder…

I will take a look at the child actor, thank you for the answer!

Can confirm, easy approch, silly as hell to do and very limiting. I remember doing this waaaayyyy back in 4.4. I think i might have a pic of it too. it’s a lot more work too if you want your character to be able to drop guns/items or add new ones to the game.