x


Scripted Terrain Move

I have a C# script that loads a prefab ("test") with terrain. I want the script to move the terrain, but that bit doesn't seem to do anything:

Terrain t = Instantiate(Resources.Load("test")) as Terrain;
t.gameObject.transform.position = Vector3.right * -50000 + Vector3.forward * -50000;

The terrain stays at 0,0,0 as it is in the prefab. How can I move it?

more ▼

asked Jan 24 '11 at 04:11 AM

user-4179 (google) gravatar image

user-4179 (google)
18 2 3 4

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

0 answers: sort oldest
Be the first one to answer this question
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:

x1521
x1333
x1288

asked: Jan 24 '11 at 04:11 AM

Seen: 407 times

Last Updated: Jan 24 '11 at 04:11 AM