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"

Attach actor to actor problem 4.12

Hello everybody, so I've got a problem: I'm trying to attach a "gun barrel" static mesh to a "gun skeletal" mesh on a socket called "Barrel". I've set the mesh perfectly in Maya and when I preview the the mesh on the "barrel" socket while looking on the skeletal mesh, everything looks fine. Here's the funny part: when I make the gun mesh touch the barrel inside the level, the barrel snaps to the mesh, but I think to its root, and not to the designated socket

Here are the blueprints

alt text

alt text

And here's the way it acts https://i.gyazo.com/cce6d675c81b7e9fe717dad54d1dcaeb.mp4

Tjank you in advance

Product Version: UE 4.12
2.png (145.3 kB)
1.png (172.9 kB)
more ▼

asked Jul 18 '16 at 02:50 PM in Blueprint Scripting

avatar image

3 1 2 4

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

1 answer: sort voted first

Check Bone Name. Case Sensitive and empty spaces will screw it up.

I also assume this is your Weapon BP? Why the Begin Overlap is there? Your weapon moves around a lot including your Collision. You should have the Overlap in the Character and forward the information to the Weapon instead.

And not a critical thing at the moment but you should get rid of the Get All Actors of Class node. If you have more than one DRL-16 in the Level it will get all of them and attach them to your weapon instead of only the one you picked up. Save the refference you get from the overlap into a variable.

Everything else looks fine to me.

more ▼

answered Jul 18 '16 at 04:41 PM

avatar image

7k 143 28 172

avatar image BelliniVirgil Jul 18 '16 at 05:42 PM

Thanks for the reply!

I checked out the bone Name, it's the same as in the blueprint.

alt text

The Begin Overlap is only for testing purposes, and you're right, I'll put it in the player controller.

As for the Get All Actors of Class Node, I want the barrel to check all the weapon instances in the level and attach only to the one that is attached to the player, ergo there's the bind event state that checks a variable from the weapon called "Equipped?", so if the weapon is attached to the player and Equipped is true, the barrel will attach only to that instance.

I still don't get why the barrel won't attach to the socket

3.png (912.6 kB)
(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