hierarchy attach, detach on python


i need to know about python script about hierarchy attach and detach.

is there any function on this?

i want to detach product from link. and sometimes attach it on link.

need your help please

See the example about the attach method:

If you are attaching dynamic components (components created during simulation), you probably should grab it to a component container behavior instead:

1 Like

when i tryed those [Hierarchy] - [Detach] , its working so i want to know that function on python script.


Anyway thanks.

i need to study more and more.

i think its working but my skill need to be grown.

In the Python script, there is a corresponding function of the same name attach(), it should be noted that, in the console to use the attach it is actually two steps: 1, will be the target object attached to the parent system; 2, correct the target object coordinates. So, if you need to use python to do the attach effect, then you also need to adjust the coordinates of the child system.
Also, it feels a bit more like grabbing by the sound of what you’re saying (not sure if I’m misinterpreting :joy:), and if so, you might also want to take a look at the grab() function.

thanks for help!
i will try it.

Detaching is the same as attaching to the world root node.

1 Like