Detach Children and protect position

Hello,

i need retain children from parent and save world position child’s.

How can achieve this?

Thanks.

You can make use of Node::convertToWorldSpace() and Node::convertToNodeSpace() to achieve this.

Call convertToWorldSpace(0,0) on your node and cache that value before you remove from parent
Call convertToNodeSpace(worldPos) on parent after you add to new parent with the above value (setting your node position to the result)

Hope this helps