Search Unity

TerrainCollider triangle flipping

Discussion in 'Physics' started by Marrt, Dec 8, 2019.

  1. Marrt

    Marrt

    Joined:
    Feb 7, 2012
    Posts:
    613
    I do procedural terrain generation for a polystyle world. To give it a more natural look, i want to flip the triangles per quad every once in a while.

    Is there a way of flipping triangles for Unity terrain colliders?

    Currently i create the mesh as a separate Object and only use the terrain for its collider because it is faster than mesh colliders. Assigning new mesh colliders creates unbearable lags, terrain colliders do not.

    But without triangle flipping in the terraincollider, my collisions look like that:
    upload_2019-12-8_22-35-46.png

    i only found this https://docs.nvidia.com/gameworks/c...hysx/guide/Manual/Geometry.html#height-fields

    Another way could be a this, but i would appreciate the terrain approach:
    https://docs.unity3d.com/2019.3/Doc...7.1595896369.1575809661-1295778461.1543368316
     
    Last edited: Dec 8, 2019