How to add a Weapon to the "MyCharacter" Blueprint?
SO i basically followed this tutorial here:
I importet the Hands and Animations and voila, the hands where there. (only that the hands where not following the player wich was kind of odd. when i looked left and right they moved but when i wanted to look up or down they where not moving) Then i wanted to add the first weapon.
Now i already created an WeaponType Emu and i Assigned the new Weapon Mesh to the right Socket of the Player Mesh. i positioned it and saved.
No i went into the MyCharacter Blueprint where i created the need variables. I noticed that in the Turorial he also had a "Mesh1P" variable wich i dont know what tyoe it is and for what i need it.
I created the change weapon funktioned as in the Tut but im stuck with the "Set Static Mesh" and "Attach to" Nodes. Every time i spawn in a "Set Static Mesh" it has the Target "self" and in the Tutorial it has not!!! I also cant attach the "weapon" variable to the target because it tells me:
"Opject 2staticmesh is not compatible with Object staticmeshcomponent"
How can i make this like in the tutorial?
Heres the Change Weapon Funktion from the Tutorial:
And here is mine. now i created everything the same like in the Tutorial except for the "Set Static Mesh" and "Attach to" funktions. i importet those but in the "Target" spot both have "self" and i dont know why. in the tutorial they have not.and i cant assign the weapon variable. And the "Mesh1P" i just created myself. i dont know how he did it in the tutorial, he seemed to have skipped that part. maybe thats the problem. i dont even know how blueprint knows to attach the weapon to the character. i never selected the hands mesh or the weapon for the whole blueprint. how is this working?
Ok. Have you checked if the Variable is of the type Static Mesh and not on Static Mesh Component?
The question how this works is easy. Your Hands Mesh has a Socket. In the Tutorials you were told to create it. A socket is a place at your mesh where you can place a model. It follows the bone at which it was created. For better understanding:
Imagine a socket that is created at the middlehandbone and its called Right Hand Socket. Now you can attach a spawned static mesh to it. Like a sword. It will follow the right hand than. I hope that answers your question and i really think set the wrong variable type for the weapon. Maybe a mistake while being to fast.
answered Aug 11 '14 at 12:40 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here