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.
That’s both not true.
Look at the Tutorial picture of the nodes.
The SetStaticMesh Node gets the Weapon StaticMeshComponent as the Target. So it’s Mesh will be changed. And the second pin of the SetStaticMesh Node is set to the reaper model.
And the question with the socket is the same. Your “Mesh1P” is the mesh, that got the Arms. Look at the part auf the tutorial where he sets up the Hands. You can see that he named the Arms “Mesh1P”. So thats the component he checks for the Socket Name. You set up the socket, so he can find it and attaches the StaticMesh to it.
Have you fixed the issue with the Weapon variable?
The Author did a mistake here.
Look at this Picture here:
Right under the Mesh1P, there is a thing called “Weapon”. It’s of type “StaticMeshComponent”. If you create this, you can use it in you Blueprint. It will be shown as a Variable in the left panel.
That’s the Variable you need to use for the two Nodes. You can also see that by looking at the Tutorial Version of that step. Right under the name of the function “SetStaticMesh” there is the type of the Target “Target is StaticMeshComponent”.
I don’t know why he told you to create a Weapon Variable. Maybe you need i later but for now, i would delete it, create the StaticMeshComponent in you Components Tab. Drag it at the CameraComponent, so that it’s a child of it and use this one.
Your hands not following your mouse/camera movement could be the fact, that you didn’t make it a child of the CameraComponent. Look at the Tutorial picture.