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"

How can I unparent an object so that it is no longer a parent?

Hi there. I have a blueprint function that attaches a bunch of objects to a specific object. When the transition is done I would like to unparent that specific object and parent another. How can I do this with blueprints?

Thanks in advance

Product Version: UE 4.22
Tags:
more ▼

asked Jun 15 '19 at 10:44 PM in Blueprint Scripting

avatar image

AceHigh
6 2 8 9

avatar image SithHunter Jun 15 '19 at 11:04 PM

Just to be sure of exactly what you're looking to do, could you give a bit more context / info on how you want the function to behave?

avatar image AceHigh Jun 15 '19 at 11:47 PM

Yes. I have a bunch of actor objects rotating around a specific parent. When the rotation is done I would like to choose a different parent and do it again, however, as it stands I just end up with 2 or more parents instead of just 1.

Thanks for your speedy reply!

avatar image Everynone Jun 16 '19 at 08:08 AM

Assuming you're using AttachToActor node, you can DetachFromActor once the rotation is complete and attach to another - why wouldn't that work?

avatar image AceHigh Jun 16 '19 at 01:25 PM

No DetachFromActor only detached child nodes and does not stop the parent being the parent.

avatar image Everynone Jun 16 '19 at 09:10 PM

How are you attaching them then?

avatar image AceHigh Jun 16 '19 at 09:17 PM

You are right in assuming I am using AttachToActor.

avatar image Everynone Jun 16 '19 at 09:18 PM

I've been using it for years, what does not work about it?

Image from Gyazo

avatar image AceHigh Jun 16 '19 at 09:21 PM

DetachFromActor is giving me some unreliable behavior but everything seems to be fine without using it just that I end up with multiple parents. Which is what I want to know if I can avoid.

avatar image Everynone Jun 16 '19 at 09:23 PM

I just end up with 2 or more parents instead of just 1

I end up with multiple parents.

How does this manifest? Any examples?

avatar image AceHigh Jun 16 '19 at 09:26 PM

ok I have a bunch of cubes and i want to rotate around whichever cube is active. the rotation is currently hinged on me rotating everything around the parent (active cube) but when i try to move to another cube and rotate again my last parent remains active with the new one. I might just try to rotate everything around the cube instead of making it parent if there is no way to detach parents from one another,

avatar image Everynone Jun 16 '19 at 09:33 PM

but when i try to move to another cube and rotate again my last parent remains active with the new one.

I don't think I'm following what you're trying to achieve here.

my last parent remains active with the new one

Remains active? What does it mean? With the new one? New one what?

Does the animation I attached above come anywhere close to what you're trying to implement?


Technically, you do not even need to Detach, an Actor can be only attached to single parent at a time afaik... That's what I'm not understanding here - where is this multiple parents idea coming from? You're not rotating around 2 parents, surely; unless you're talking about their average vectors or something similar.

Are we talking about nesting parents within other parents?

avatar image AceHigh Jun 16 '19 at 09:38 PM

I don't think I'm following what you're trying to achieve here -imagine a sphere moving around inside a maze of cubes Remains active? What does it mean? With the new one? New one what? The maze of cubes is supposed to rotate around the sphere. However after each rotation another parent is added to the last parent. I would like to be able to say 'unparent last parent' and keep the new one each rotation.

Thanks in advance!

avatar image Everynone Jun 16 '19 at 09:35 PM

ok I have a bunch of cubes and i want to rotate around whichever cube is active.

So each cube can become a parent or a child at any time - is this the case?

avatar image AceHigh Jun 16 '19 at 09:39 PM

yes thats right

avatar image Everynone Jun 16 '19 at 09:45 PM

Close enough?

Image from Gyazo

That's just a matter detaching everything from current parent and attaching again to a new parent.

avatar image AceHigh Jun 16 '19 at 09:48 PM

ok thanks what you have done seems to prove it works just fine must be something I missed you can mark this one as solved.

Thanks again!

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

2 answers: sort voted first

Yes it turns out i was trying to detach all the cube actors in a for loop when all i had to do was detach the parent actor. Thanks again I really appreciate your quick response.

more ▼

answered Jun 16 '19 at 09:54 PM

avatar image

AceHigh
6 2 8 9

avatar image Everynone Jun 16 '19 at 09:56 PM

It all makes sense now, thanks for being patient!

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

Leaving this here in case anyone needs something similar. It could make a part of a challenging puzzle, actually.

alt text

Image from Gyazo

you can mark this one as solved

No can do, that's your job! ;p

Good luck with the rest.

capture.png (115.5 kB)
more ▼

answered Jun 16 '19 at 09:55 PM

avatar image

Everynone
15.3k 77 26 62

(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