Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Attaching a static mesh to the second skeletal mesh on the player

Hello there, okay so im getting way out of my depth here but the best way to learn is throw yourself in at the deep end right? Okay to the problem.. i have a weapon static mesh. (JNG90) and i have a system in place to attach it to the socket on the third person mesh. Im trying to have this game so that when you hold the RMB, it switches to first person. Ive done this by adding the skeletal mesh from the FPS template of UE4 to the third person project im working in. Ive then managed to get that into the character BP and simply added a toggle visibility on the two meshes when RMB is pressed and released. Besides the point. I have a socket on the third person and a socket on the 1st. When i try to attach the weapon to the socket on the second FPS skeletal mesh, it adds itself instead to the floor of the third person, not in a socket just like, on the floor at what i guess is 0,0,0.

Any ideas how i can specify which mesh to attach it too? Hopefully the images help explain my point.

Thanks alt text

Product Version: Not Selected
more ▼

asked Feb 27 '15 at 03:23 AM in Blueprint Scripting

avatar image

40 8 6 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You can use Attach Actor To Component blueprint node.

In your graph of your blueprint, simply use that, with the target being your weapon, and the component being your selected Mesh.

You will also have to specify yur socket name and how to attach it to the component, in your case, I'm guessing it would be to Snap to Target.

alt text

attachactor.png (56.2 kB)
more ▼

answered Feb 27 '15 at 01:32 PM

avatar image

2.1k 70 38 259

avatar image trias1995 Feb 27 '15 at 04:09 PM

Hmm, it would seem that i'm not actually able to connect the mesh for my weapon to that target slot.. am i adding the weapon wrong? alt text

untitled.png (132.6 kB)
avatar image MickD777 Feb 27 '15 at 05:36 PM

It would seem you have some concepts to learn :)

Here we go:

An Actor and a Component is NOT the same thing. The Actor can be seen as the Container, while a Component is something you put in it. Basically, a component is always part of 1 actor, while the actor can have multiple components.

What you are trying to do in that picture is use a Component (a static mesh component to be exact) as an actor. It's not going to work. Fortunately, there is also a node to attach a component to a component!

Basically, when you use **Attach Actor to Componen**t, you are actually linking the component to what is called the Root Component of the actor. So in theory, you always connect components to other components.

To do what you want, use the Attach To node.

alt text

attactto.png (51.1 kB)
avatar image trias1995 Feb 27 '15 at 06:24 PM

Lol yeah i do have a lot to learn still :') thank you for explaining that however the Attach To node is one i was already using but, having just gone and tried it, i wasnt specifying the correct mesh to attach it too so yeah i got there in the end but as for the explanation about components and actors, that's helped a lot so thank you for that. Ill mark this as answered but whilst im here, i dont suppose you know how to delete a mesh from a socket, as in totally remove that mesh from the game not just from the socket?

Thanks anyway!

avatar image MickD777 Feb 27 '15 at 06:35 PM

Sure, it's the Destroy Component node. I recommend this serie of tutorial for you :


It helped me a lot in the beginning!

Don't forget to re-accept the answer, commenting on it actually remove that.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question