How do I Re-parent an entity but maintaining the entities original proportions?

Hi, when I reparent an entity to some other parent the entity takes on the scale and proportions of the new parent. How can I prevent that?

Hi @Grimmy,

Check this post, it provides a way to get around that: [SOLVED] Retain global position and scale of element when reparenting

Thanks, that looks incredibly complicated for what it does:).
As a wishlist item; maybe it would be an idea to have an argument in the Reparent api which you can set true/false to adopt or refuse to adopt the parents transforms?

Yeah, that can be useful, though I think scaling isn’t so straightforward.

Try posting a feature request in the engine repo about it.

Yeah, I’m trying the workaround for the post you mention but scaling doesnt seem to do anything?

this.sc =this.my_tracked_clone.getScale();
this.my_tracked_clone.reparent(this.entity);
this.my_tracked_clone.setLocalScale(this.sc);//Doesn't do anything..same scale as before

Does getScale() even exist in the api?

No it doesn’t, scaling is local.

Make sure to follow the exact code, it involves using the world matrix (I haven’t tried it myself):