Setting transform parent without recalcing new world

Seems kind of weird that setting transform.parent = x implicitly multiplies in the inverse of x in order to keep the world transform the same as pre parenting. Is there a way to avoid this?

Ie, if x.position == Vector3( 1.0f, 0.0f, 0.0f ); transform.localPosition == Vector3( 0.0f, 0.0f, 0.0f ); I don’t want transform.localPosition == Vector3( -1.0f, 0.0f, 0.0f ); after I reparent.

Nope, you have to set them back afterwards. The reason is clear if you consider what happens in the editor, you certainly don’t want things moving when you drag them into a different parent so the code works the same way. Instantiate an object, store whichever factors are important and then play them back on when you have set the new parent. I suggest you write a static function somewhere to do this if you have to do it often in your design.