- Home /
Question by
Wenon · Apr 23, 2018 at 05:57 PM ·
instantiatetransformposition
How to spawn object but with child as center of position
Hello, I have a object with empty object as child which is not in center of parent. I want when I will do transform position, object will change position by child position not by center of parent. I tried do this by
Vector3 childpos = tr.transform.Find("Connector").position;
tr.transform.position = tr.transform.position - childpos;
but object spawn upward. Please help
Comment
Your answer
Follow this Question
Related Questions
I need help with the location of instatiated objects on the scene and correct interaction with this 2 Answers
Why can't I instantiate an object that is +5 in the x and z axis? 1 Answer
Copy position from one object to another on one axis 0 Answers
How can I Instantiate a prefab (projectile) consistently from the character? 0 Answers
Instance child global position 1 Answer