Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Better way to handle colliders for terrain meshes

Discussion in 'Getting Started' started by xjjon, Nov 5, 2023.

  1. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    606
    I have these low poly meshes that I use for creating terrain such as mountains and things. Some of them are more like terrain meshes converted into mesh colliders.
    Here's the mesh with shaded wireframe to give a better idea:

    upload_2023-11-5_15-27-43.png

    However I need it to be a convex mesh (otherwise Physics.ClosestPoint won't work), so I used V-HACD to create these smaller convex meshes.

    upload_2023-11-5_15-27-10.png

    Is there a better approach to doing this? Seems like adding a lot of colliders for what should be simple collisions and detection. Thanks