x


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?

more ▼

asked Sep 07 '11 at 09:24 AM

Ale gravatar image

Ale
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
more ▼

answered Sep 07 '11 at 09:55 AM

Ale gravatar image

Ale
1 1 1 1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2165
x915
x222

asked: Sep 07 '11 at 09:24 AM

Seen: 931 times

Last Updated: Sep 07 '11 at 11:36 AM