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

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?

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!

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

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

1 Like

How are you attaching them then?

You are right in assuming I am using AttachToActor.

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

Image from Gyazo

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.

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?

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,

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?

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?

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!

yes thats right

Close enough?

Image from Gyazo

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

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!

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.

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

Image from Gyazo

you can mark this one as solved

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

Good luck with the rest.

It all makes sense now, thanks for being patient!