0
\$\begingroup\$

I'm having problems with terrain scripting while trying to do a infinite-world with Unity's terrain generation.

How do I change the terrain height at specific points? And how do I set the amount of terrain generated?

Edit: What I'm having problem with is doing that from a script, from the editor is plain easy.

\$\endgroup\$
  • \$\begingroup\$ I was also looking for a tutorial to what docs.unity3d.com/Documentation/ScriptReference/TerrainData.html means. You've edited my answer maybe a bit too much. Now If someone knows that, I won't get that answer. \$\endgroup\$ – Iridium616 Feb 1 '14 at 16:48
  • \$\begingroup\$ I removed that because asking for tutorials is not the purpose of this site. Instead of asking for a tutorial, ask about the problems you think a tutorial will solve for you. \$\endgroup\$ – MichaelHouse Feb 1 '14 at 16:50
  • \$\begingroup\$ What have tried already? I created a terrain object and found it simple to change the size, and using the tools it's simple to change the height values. Maybe you can explain more about what you're having trouble with. \$\endgroup\$ – MichaelHouse Feb 1 '14 at 16:55
  • \$\begingroup\$ "Using the tools" I'm trying to do it from a script. I'm having trouble with understanding the obscure functions. \$\endgroup\$ – Iridium616 Feb 1 '14 at 16:59
  • 1
    \$\begingroup\$ @Iridium616 Please provide the answer in the answers section. \$\endgroup\$ – concept3d Feb 1 '14 at 18:01
-1
\$\begingroup\$

Nevermind. After an hour of trying I have found the method.

Well, it's actually a variable, and it's a Vector3 called "size", who could have guessed it?

I still can't believe I've missed it for that long.

For heights, still as obvious, "SetHeights method";

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This doesn't address the changing specific height values portion of the question. \$\endgroup\$ – MichaelHouse Feb 3 '14 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.