Most simply attach static mesh to another static mesh

Hi all.

Real noob with unreal and blueprints.

I’m using the simple 3d template, no player - just static meshes and class blueprints.

I’d like to “pick up” a mesh with another mesh, so that they move together. Think of something like this: scrap yard magnet - YouTube just without the pulling effect or any gravity - the meshes are either connected or not.

Thanks!

Hi @TheWhiteRock, and thanks.
That’s not what I meant.
I already have two actors, based on different class BPs, both with scene roots and a single mesh. I’d like to be able to make one actor to attach itself to the second actor, so when I move or rotate the second one, the first one follows. Later, I’d like to detach them.

Thanks.
How does one go about adding a socket to a simple (not-player) actor?

Found here

Thanks a lot!

Hello Gabriel,

In your blueprint, look into the Components window. It, by default, is in the top left of your window. Click on “+Add Compnent” and select Static Mesh. Select that item and choose the mesh you want. Do this for as many meshes you want in the BP.

You should see a component called Default Scene Root. Drag and drop an item you want to be your root to that slot. I do not use any of my meshes as roots because they are all children and I need to move them around individually. So, in my image here, I use a simple box collision and set it to “No Collision”. It is simply an invisible box I use as a root.

Lastly, drag and drop your meshes on top of the root and it will prompt you to make that mesh a new root or attach it. Of course, attach it. You should see your meshes cascade below the root, as seen in my pic.

222159-meshattach.jpg

If in the future you want to add physics, set it on the Box collision, the root item, and it will replicate to the attached items and they will all move together.

Sorry - I believe I misunderstood what you were wanting to do initially.
Let’s say you had a trash BP and you wanted the magnet to hover over and attach the trash. I would use the AttachToActor node. Create a socket on the magnet. Set up the AttachToActor in the trash BP, then attach the trash to that magnet’s socket once it get’s close enough.

You’re very welcome. Good luck!