Search Unity

Colliders in Probuilder

Discussion in 'World Building' started by mpottage, Feb 10, 2019.

  1. mpottage

    mpottage

    Joined:
    Jan 17, 2018
    Posts:
    2
    I've been watching Probuilder tutorials, about greyboxing a level, but when it try it none of my stuff has colliders attached, and the tutorials never cover it? Using the "Set Collider" button just makes my meshes disappear when play testing. Am I missing something?
     
  2. kphipps

    kphipps

    Joined:
    Apr 26, 2013
    Posts:
    51
    I believe new Probuilder objects have mesh colliders on them by default (which matches the object exactly).

    I think the 'Set Collider' function turns an object into a collider (mesh collider + not visible at runtime).

    You either want to use a mesh collider for an object, or delete the mesh collider and create simpler separate colliders for the objects with Probuilder and use 'Set Collider' on them (which will add a 'Collider Behaviour' script).
     
    mpottage and gabrielw_unity like this.
  3. mpottage

    mpottage

    Joined:
    Jan 17, 2018
    Posts:
    2
    Thanks for replying, just tested it out in Unity and the collider is just there. Not sure how I missed that.
     
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    623
    Hi! Thanks @kphipps for helping out! Correct - PB applies a mesh collider by default, which you can't see in the sceneview. A quick check in the inspector should show the component, though :)

    Regarding "Set Collider", that's a special action (more info:
    )
     
    mpottage likes this.
  5. K-ANator

    K-ANator

    Joined:
    Feb 25, 2017
    Posts:
    3
    Slight necro, but I've just started using ProBuilder, and I've noticed that my meshes are coming in non-convex, which is causing nothing to collide with them. So I'm having to check "Convex" on each shape as I make it.
     
  6. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    153
    You can change the default value of the convex flag in Preferences/ProBuilder.