Search Unity

Feature Request Terrain deformation at runtime?

Discussion in 'Editor & General Support' started by captainspaceman, Mar 15, 2021.

  1. captainspaceman

    captainspaceman

    Joined:
    Jul 14, 2017
    Posts:
    42
    So I was trying to think up a way to make simple deformable terrain so that explosions make craters in the ground and whatnot, I only want to deform on the Y-axis, and it was getting really complicated with chunks and LOD and multithreading, but then as a side project, I worked on something else and used the terrain feature in Unity (which I haven't used in a long time) and was surprised at how fast and efficiently Unity was able to subdivide the mesh, deform it, and then decimate it afterward all in real-time. Of course, the mesh collider wasn't updating with that but regardless, it would be amazing if this were a feature one could have in their game at runtime.

    Such a feature would allow for the easy programming of craters in the ground from explosions and other things in your game. This feature is in many popular FPS games.

    I hope this is the best place to post something like this, thank you.
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
  3. captainspaceman

    captainspaceman

    Joined:
    Jul 14, 2017
    Posts:
    42
    Thank you, I'm trying to use the files but TerrainDamager needs a TerrainDataCloner class which I could not find anywhere in the repository. Maybe I'm just blind but I looked for like 15 minutes lol
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    If you are in Unity you can just type "cloner" in the find field of the project window, and I think github has some kind of search too.

    It's in the
    ZNotMyCode
    folder because ... that was not my code!
     
    captainspaceman likes this.
  5. captainspaceman

    captainspaceman

    Joined:
    Jul 14, 2017
    Posts:
    42
    Ah ok thank you I will give this a try!