So, I’m trying to create a way for the player to customize their character in game. The main way that I want this to be done is by swapping materials on the mesh used by the third person character blueprint and by adding a model that is parented to a socket on the head.
I’d like to make a blueprint for an object you step up to in the world that lets you begin to swap the materials and add the models. I have watched a lot of tutorials on changing materials but I haven’t gotten this to change the third person character mesh.
How can I target the player character’s mesh in this blueprint? And how can I tell the blueprint to add a model on the player character’s mesh?
Hopefully I explained this correctly, I am new but I’ve been teaching myself a lot as I’ve gone along.
Hey there @dubthedubmeister! Welcome to the community! In this case, one of the easiest ways to do this is to cast to the character to be able to access the mesh, then get the mesh, then set material. Blueprint example below:
This is pretty much as far as I’ve gotten before. I’m currently stuck because when I connect the “As Bp Thirdpersoncharacter” to “Target” on “Set Material” it chooses to target the “Capsule Component” instead of the Mesh.
Drag a wire from As Bp Thirdpersoncharacter to Get the Mesh first, then drag a wire from Mesh → Set Material.
BPs are context sensitive, avoid plopping down unconnected nodes and only then connect them. Try to drag the wire first - you’ll get narrowed down, filtered, compatible results that make sense in the very context at hand.