Search Unity

Question Automatically add a 2D Edge Collider to Unity's terrain shape

Discussion in 'Physics' started by Mantra-Games, Jun 11, 2021.

  1. Mantra-Games

    Mantra-Games

    Joined:
    Nov 27, 2012
    Posts:
    169
    Hi,

    I'm looking for a script to automatically add a 2D Edge Collider to Unity's terrain shape, instead of having to manually adjust points to align with the terrain's hills. This is for a pseudo 3D game using the Corgi engine which uses the 2D collider model.

    Has anyone ever seen something of this nature? I'm not a programmer so I'm looking to find or purchase one.

    Cheers!
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,491
    That doesn't really make sense. How would a chain of 2D edges map to a 3D terrain surface? In answer to your question, no I've never heard of anything like that. Probably because it's a very specialsed thing to want.

    I can imagine you projecting a set of points down onto the terrain and using that height to set each edge but yeah, sounds like something you'd need to get someone to write a script for you.