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"

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: https://www.youtube.com/watch?v=lSmuqLtmuwg just without the pulling effect or any gravity - the meshes are either connected or not.

Thanks!

Product Version: UE 4.18
Tags:
more ▼

asked Dec 01 '17 at 04:05 PM in Blueprint Scripting

avatar image

Gabriel Wainmann
3 1 3 6

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

2 answers: sort voted first

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.

more ▼

answered Dec 01 '17 at 04:38 PM

avatar image

RatatatRandy
98 4 4 7

avatar image Gabriel Wainmann Dec 01 '17 at 04:40 PM

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

avatar image Gabriel Wainmann Dec 01 '17 at 04:42 PM
avatar image RatatatRandy Dec 01 '17 at 04:57 PM

You're very welcome. Good luck!

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

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.alt text

meshattach.jpg (27.7 kB)
more ▼

answered Dec 01 '17 at 04:28 PM

avatar image

RatatatRandy
98 4 4 7

avatar image RatatatRandy Dec 01 '17 at 04:30 PM

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.

avatar image Gabriel Wainmann Dec 01 '17 at 04:35 PM

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.

(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