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?

1 Answer

1

found the answer myself here: How to move one object to the exact position of another object? - Questions & Answers - Unity Discussions