x

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 to Compent node only runs after World Outliner selection

I have a first person character that needs to be able to wear a welding mask when the player equips it. The mask is a separate blueprint from the character, and has a skeletal mesh component that attaches itself to the player's camera when created/equipped. The attached blueprint is used to do this(this is on the mask itself). It works just fine right up until the AttachToComponent node, which seems to be getting ignored. This causes the mask to just hang in space at it's spawn point without moving, regardless of what the player does. The mask does appear as a child of the character in the Outliner though, so I guess the AttachToComponent node isn't getting completely ignored... Here's the interesting bit; if I hit shift+F1 during game play, go and select the mask in the World Outliner, and select the game window again, the mask follows the camera like it's supposed to.

I might just be doing something wrong, but I thought the change in behavior after selection in the Outliner was interesting...any ideas are welcomed. alt text

alt text

Product Version: UE 4.18
Tags:
more ▼

asked Mar 04 '18 at 07:35 PM in Blueprint Scripting

avatar image


8 2 3

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Try giving it a socket. Add a socket to the "head" bone and use the name you give it in the attach node.

more ▼

answered Mar 04 '18 at 08:43 PM

avatar image

Jin_VE
4.3k 31 77 40

avatar image Mar 04 '18 at 09:01 PM

This is actually what we were doing at first, and it does kind of work. The problem is that the head dosn't turn with the camera's left-right rotation (mesh skinning wasn't looking too good when the head rotated), so looking left or right results with you looking at the side of the inside of the mask. I guess I could change how the camera is attached to the character to get around the issue though...

avatar image Jin_VE Mar 04 '18 at 10:10 PM

AnswerHub is being strange. I can't comment on another question because it says I'm not logged in when I clearly am. And my response here never got posted...

avatar image Jin_VE Mar 04 '18 at 10:11 PM

Try adding the socket to the root bone instead of the head. That should keep it at a fixed point relative to the actor and follow its rotation.

(comments are locked)
10|2000 characters needed characters left
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