Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Collisionmesh import

Discussion in 'Editor & General Support' started by polyphobia3d, Feb 26, 2011.

  1. polyphobia3d

    polyphobia3d

    Joined:
    Nov 7, 2010
    Posts:
    13
    Hello everyone,

    is there a way to import collisionmeshes like it is possible in the Unreal engine?
    Basicly there you flag parts of your model with a prefix and urneal automaticly uses these meshes to generate the convex hulls.

    So lets say i have a bridge (simple example could be anything really) which is convex on the upperside but concave on the lower like this



    now as far as i know i'd have to break the bridge up into seperate convex meshes, like this



    but instead i'd like to import another mesh which gives the information of the colission to unity, so for what is rendered i'd like to see the green bridge but for collision generation i'd like to use the much simpler red convex meshes



    It is really just a super simple example, i could expand it by having something like a rail on the sides, which would add concavity to the upper side etc. lets say i want the player to run over a giant statue or some super organic rock terrain, it would be great to guide unitys collision generation with simpler meshes.

    So is there any way to achieve this without having to create like a prefab for every complex mesh i import with a not rendered seperate model which is used for the collision?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,121
    You don't need to use convex meshes; the standard mesh collider is fine for static geometry. If the question is about simplified colliders, just use a different mesh for the collision mesh; there's no reason why the collision mesh and the visible mesh have to be the same.

    --Eric
     
  3. polyphobia3d

    polyphobia3d

    Joined:
    Nov 7, 2010
    Posts:
    13
    so i guess this means no out of the box automations on this matter right? I guess then the only options for it would be to do it by hand, import the art and then import the collision meshes, or write a script to do that for us?