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

Any good assets out there for merging mesh colliders?

Discussion in 'General Discussion' started by Meltdown, Jul 3, 2018.

  1. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,796
    I'm creating a track editor for my game, so I have a bunch of track pieces, each with their own mesh colliders that I put together to form the track.

    I'm looking for a tool to be able to merge these colliders all into one, is there a tool anyone knows about for this?

    I have MeshBaker but it doesn't seem to support merging of colliders.

    Thanks
     
  2. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    You can use mesh baker create a script that clones each transform that holds a mesh collider set the mesh as render mesh use these as input for mesh baker
     
    Meltdown likes this.
  3. RuinsOfFeyrin

    RuinsOfFeyrin

    Joined:
    Feb 22, 2014
    Posts:
    785
    Area they primitive colliders, or mesh colliders?

    If they are mesh colliders, simply merging the meshes, and then re-applying the mesh collider would do this.

    If they are primitive colliders, there is nothing that I am aware of that does this. The reason being is primitive colliders are primitive shapes because the math needed to check for collision is much simpler, and sort of 'merging' of the primatives would take it back into the realm of a mesh collider.
     
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,763
    They literally say they're using mesh colliders in the post you quoted.
     
    AndersMalmgren likes this.
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    In all honesty, in this situation I would simply write the tool myself, as it wouldn't take too long.
     
  6. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,796
    I'm not generating the mesh colliders in Unity, they come in the FBX file as I asked my artist to build the colliders into the model.

    Thanks for the responses all I found an asset that does the trick.