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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[RELEASED] Destructible Terrain 2D

Discussion in 'Assets and Asset Store' started by Doyou, Jun 25, 2015.

  1. Doyou

    Doyou

    Joined:
    Jun 19, 2015
    Posts:
    3
    Hi everyone,

    I just released a new asset in the Asset Store. It's a simple tool for building 2d destructible terrains. Those terrains can be procedurally generated or builded from a Texture2D. The rendering is made using a MeshRenderer, and it provided a PolygonCollider2D.

    Features
    • Customizable procedural generator
    • Runtime terrain generation
    • Sprite based terrain builder
    • Destructible terrain
    • Prefab terrain exportation

    Links
    Asset Store | Web Demo | Documentation

    I really hope you like it and tell me if you have any questions or comments.

    Thanks,
    Benjamin
     
  2. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    324
    Humm, Did try this and this asset can not create terrain from alpha sprite with a alpha hole inside it. I have this sprite, but your plugin can not make terrain from it: wrong UV, wrong generated mesh, bad ! Don't recommend this !
     

    Attached Files:

  3. Doyou

    Doyou

    Joined:
    Jun 19, 2015
    Posts:
    3
    Yes you're right. I'm sorry but this is what I meant when I said in the description that : "This tool can't handle terrain with full holes inside them."

    Actually I'm working on a solution using shaders for rendering holes, this will solve this problem. I expect to released it in a few days.
     
  4. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    324
    I think you should not using Shaders for rendering. Have some other plugins using method get pixels of texture to rendering. And you also should fix the UV error. Textures apply to mesh will be wrong UV.
     
  5. Doyou

    Doyou

    Joined:
    Jun 19, 2015
    Posts:
    3
    Last edited: Jun 26, 2015
  6. madfatcat

    madfatcat

    Joined:
    Jul 3, 2014
    Posts:
    14
    Hey Doyou,
    Is there a way to make a separate rigidbody from a collider which was completely separated from the main terrain? I'd like separated parts behave like dynamic rigidbodies and fall down once separated. If there's no such feature, how easy do you think to add it? Is new PolygonCollider2D created each time the piece is separated from the main terrain?