Search Unity

mesh collider wont work without convex??

Discussion in 'Physics' started by alexchandriyaa, Feb 5, 2018.

  1. alexchandriyaa

    alexchandriyaa

    Joined:
    Jan 18, 2017
    Posts:
    140
    is there any way to use mesh colliders without convex?
     
  2. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    What are you trying to achieve?
     
  3. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    For rigidbodies no, you should avoid mesh colliders all together on dynamic objects.
     
  4. alexchandriyaa

    alexchandriyaa

    Joined:
    Jan 18, 2017
    Posts:
    140
    am trying to do buzz wire game.. for that i have created mesh collider and rigidbody for hoop, for wire i have created few box colliders without rigidbody am using ontrigger for detecting if hoop hits wire the cube has to change its color to black but here even the hoop not hit the wire it is changing


    public void OnTriggerEnter(Collider col)
    {
    cubeColor.material.color = new Color (0, 0, 0, 0);
    }
    public void OnTriggerExit()
    {
    Debug.Log ("Exit");
    cubeColor.material.color = origi;
    }

    Capture2.PNG
     
  5. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Why are you double posting?
    Why not use the last thread from yesterday?
     
  6. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Look into Obi rope. Rigidbodies are not very suited for this kind of simulation. We use it in our game.



    edit: Since that video was taken I have lowered the amount of particles and lowered gravity which make the ropes a little more cable/wire like. But still not a perfect simulation of wires. But ok

    edirt: ah S***, you want none plastic wires :D The ring should be able to be roughly represented with capsule colliders. The wire should also be able to use capsule colliders, or maybe mesh collider if its static. But mesh colliders often create unstable results when colliding with rigidbodis
     
    Last edited: Feb 5, 2018
  7. Chrisasan

    Chrisasan

    Joined:
    Mar 27, 2015
    Posts:
    270
    There is a script in the unit3d asset store that would allow you to get your results. It will simulate a mesh collider by using convex colliders. I have forgotten the name of it. There is more than one.
     
  8. coolbird22

    coolbird22

    Joined:
    Mar 20, 2014
    Posts:
    38
    Do you remember the name of the script ?
     
  9. ertanturan

    ertanturan

    Joined:
    Nov 19, 2016
    Posts:
    28