- Home /
Question by
ImJovem · Dec 05, 2019 at 09:56 AM ·
positionparentchildparent-child
How make an object child of other object without changing the child position?
Im trying to make an object child of other in game action, for the child follows the parent, but when I set the object to the child it immediately change the position of the child. Here is what I tried:
object1.transform.SetParent(player.transform);
and
object1.transform.parent = player.transform;
both this code lines change the child position. I tried to search other solutions but didn't see anything good.
Comment
Your answer
Follow this Question
Related Questions
Make a simple tree 1 Answer
Children Objects move weird 1 Answer
How To Get List of Child Game Objects 14 Answers