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"

How to Attach a Mesh to Socket

Hey Community,

Quick question. What is the method for attaching a mesh object to a socket on the character?

     ConstructorHelpers::FObjectFinder<UStaticMesh> Object0(TEXT("StaticMesh'/Game/Props/SM_PillarFrame.SM_PillarFrame"));
     UStaticMesh* TestingMesh;
     TestingMesh = Object0.Object;

So far this is where i'm at. I would like to call this at BeginPlay so as soon as the character enters he/she will have a particular mesh already attached, as opposed to handling it via constructor. This way in C++ I can create conditions on whether or not it is actually there or not.


Product Version: Not Selected
more ▼

asked Jun 27 '14 at 07:36 AM in C++ Programming

avatar image

Mark James G
534 44 25 52

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

1 answer: sort voted first

you're sort of halfway between two options


ake the Static Mesh a sub object ptr actor component of the actor itself, and add/remove it at any time (this is how I do things, for equipping / de equipping both skeletal mesh and static mesh weapons and armor from a character very quickly

2, more clumsy

ake a static mesh actor, spawn it at runtime, and attach it to the player using a socket name

Since I don't recommend #2 I am not going to explain it further

for #1 see my wiki tutorial!

Wiki Tutorial on custom Actor Components




more ▼

answered Jun 27 '14 at 08:36 AM

avatar image

10.7k 446 346 1090

avatar image Mark James G Jun 27 '14 at 08:49 AM

Yup, this did it. Thanks Rama-Llama, haha.

(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