Attach Skeletal Mesh Not Happening in Game

I have another nagging issue that is probably so obvious I should feel ashamed… but I feel like I’ve hit a brick wall.

I’m trying to attach a skeletal mesh (the rifle from the shootergame) to my third person character’s hands. Can anyone see anything that would make this not work as I assumed it would?

Edit, I know the socket names in each screenshot are different, I took them at different times after trying all kinds of different sockets, none of the sockets work.

I tried something else (well… a MILLION things) and I still can’t get anything to work. I’m looking at all these other people’s blueprints, doing the EXACT SAME THING, and getting nothing. I guess I need to take a break before I lose it.

I forgot to say that the cast failed.

Hello Zlspradlin,

What I would recommend is making an Actor BP for the gun, that way you can store gun-specific information in the weapon, then reference it later.

The reason the attaches are not working in your example, is because it is looking for a specific instance of the mesh/actor.

Here is an example that I was working on of a character that starts the level with a Melee weapon “Bendy Rod”. Bendy Rod is an Actor BP with the mesh component. By having this as a separate actor, I can have it do its own stuff without the Character having to think about it (It draws a trace through the rod to detect hitting something).

The reason the Cast is failing is because it needs a specific instance to reference. In your image it looks like “Rifle Gun” is a MeshActor, but that won’t work for casting. You would need to create/spawn the gun into the world, then drag from the return value to cast (the return value will be the instance). Casting to the SceneComponent would not be what you wanted anyway; The “Target is SceneComponent” means to reference something in the level already. All-in-all it is not needed to attach a weapon.

This is a lot of information, so you have any questions, feel free to ask, I am happy to help.



Ah, it is so clear now. Thank you very much for helping me to understand this. I love this community!

heys what’s that yellow-orange node between get actor and spawn actor?

If I recall right it transforms the return value to something that the spawn transform node can read/use. If I’m right, you just drag from the yellow to the orange and UE4 should automatically make it for you. It’s been a while since I played with this project though!