Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Triggers on Terrain

Discussion in 'Scripting' started by Hunter_W, May 28, 2014.

  1. Hunter_W

    Hunter_W

    Joined:
    May 5, 2014
    Posts:
    57
    Would it be possible to use a cylinder trigger to affect that specified area on terrain? More specifically, I would like to flatten that area of terrain in Start(). This also has to be in prefab. Need a simple answer.Thanks in advance!:-D
     
  2. Hunter_W

    Hunter_W

    Joined:
    May 5, 2014
    Posts:
    57
    If the above doesn't work, would editing the terrain coordinates at the prefab's position be useful?
     
    Last edited: May 28, 2014
  3. Hunter_W

    Hunter_W

    Joined:
    May 5, 2014
    Posts:
    57
  4. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    Any solution that modifies the terrain at runtime is going to require code. I don't see how a trigger or collider would help with that at all. An empty game object could be used for its location information, and you could even put a script on it that either does the work or has enough information for another script to do the work.
     
  5. Hunter_W

    Hunter_W

    Joined:
    May 5, 2014
    Posts:
    57
    I just need the terrain at the trigger's position to be flat(It's generated randomly). I'll try modifying the terrain at the trigger's position after it is generated in an empty game object as you said. Thanks!