Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How horrible is it to rely on a Mesh Collider?

Discussion in 'Editor & General Support' started by BinaryOrange, Mar 31, 2015.

  1. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    Hey guys,

    I'm building a marble game (very similar to the old Marble Madness game), and I'm going to be needing ramps and similar structures for the game.

    Since I can't afford ProBuilder I'm planning on building most of the basic shapes in Blender and then just importing each part inside of Unity to build complex levels from the basic shapes. However, most of these will need to rely on the mesh collider, since (as far as I know) you can't edit the corners of a box collider to get a ramp!

    How bad for performance would this be? Of course all flat surfaces would use a box collider, so really the only things that would need the mesh collider would be the ramps, and areas where there's a hole in the ground.

    Any suggestions are appreciated!
     
  2. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Hi Jeremy,

    Using mesh collider will cripple your system specially if your models have a high polycount, what i do is using 3ds max pro optimizer or any other mesh optimizer to make a very low poly version of the asset, then load it up as mesh collider.

    By doing this you can also by the same time create the various lod for your game assets.

    For the rest of the scene i use wherever i can the default box, plane or cylinder collider.

    Hope it help you

    Regards Peter
     
  3. louisgv

    louisgv

    Joined:
    Aug 7, 2013
    Posts:
    18
    I'm wondering why you would prefer box collider to plane or terrain collider for flat surface :-?..
     
  4. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Hi, Louis,

    Depend on what the surface accessibility would be for the player ex; if the player will never be able to get near the side of let say a box then plane collider will be perfect to only allow collision on top surface but a box collider versus a plane doesn't have a very big difference on performance.

    Regards Peter
     
    louisgv likes this.
  5. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    Thanks for the input guys, but I just went ahead and bought ProBuilder 2 rather than rely on Blender for my level designs.

    ProBuilder is well worth the money! I've been able to design my levels exactly how I want to with it. :)