- Home /
Question by
Ale · Sep 07, 2011 at 09:24 AM ·
gameobjectpositiontranslate
How to move an object to anothers object position?
if (gardienState == 1) {
print ("Move Gardien");
gardien.transform.position = gardienStart.transform.localPosition;
}
this is my code, and i'm trying to move the object "gardien" to it's starting position "gardienStart" both variables are declared as GameObjects - there's no error message, i get the print, but the object stays outside the level instead of moving to the given position.
what am i doing wrong?
Comment
Answer by Ale · Sep 07, 2011 at 09:55 AM
found the answer myself here: http://answers.unity3d.com/questions/13857/how-to-move-one-object-to-the-exact-position-of-an.html#
Your answer
![](https://koobas.hobune.stream/wayback/20220612203725im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
help with gameObject.translate 1 Answer
How to make an object go to pre-seted position in world 1 Answer
Change Gameobject in Array's position 1 Answer
How to make a object translate alonge an other 2 Answers
How to make this kind of control ? 2 Answers