Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tiling Terrain

Discussion in 'Scripting' started by adshead, Jul 19, 2005.

  1. adshead

    adshead

    Joined:
    Jul 19, 2005
    Posts:
    74
    Hi all,

    I've only just discovered Unity this week and must say the whole thing looks very impressive. I've had an idea for a game in which I need to tile together several terrain meshes. My basic question is would Unity allow me to do something like this and would I need to do it via scripting or would I need to physcially place terrain meshes in a scene next to each other?

    I want to be able let a player fly over the terrain and 'loop' from one edge of the tiled terrain to the other in any direction thus giving the impression of an infiate terrain.
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You can easily Instantiate objects from the script language.
    http://www.otee.dk/Documentation/ScriptReference/Object.html#Instantiate

    The best way to do this is probably always keeping 9 instantiated terrain meshes. So you can always see one patch further than where the player currently is at.

    You probably don't even need to instantiate but just move the 9 patches around when the player enters a new patch.
     
  3. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Hey there,

    Right now I have quite a massive level set up in Unity. (It takes about 6 minutes to traverse... I think) It is imported directly from Blender, where it was arranged. It is divided into sections like you'd imagine. This way Unity can cull it better. It actually could be looped through scripting, but I don't have a need for that. I'm sure if you got to that point and needed help with the scripting, any of the fine people here would be glad to offer some assistance. I don't think it should be too tricky to make it loop.

    Cheers,
    -Jon
     
  4. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Dang, that Joachim is one fast replier. Beat me to the punch. :)

    -Jon
     
  5. adshead

    adshead

    Joined:
    Jul 19, 2005
    Posts:
    74
    Many thanks for the tips - I'll give it a go tonight :D