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. Dismiss Notice

Question Curvy Object Collider

Discussion in 'Editor & General Support' started by MrPuppyy, Sep 8, 2020.

  1. MrPuppyy

    MrPuppyy

    Joined:
    Nov 4, 2019
    Posts:
    40
    Whenever I make a curvy object with Blender, and import it into unity, and add a box collider you can still go though it and im not sure why. Sorry i don't know where to post this as well.
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    A few things to check:
    • Does your GameObject have a Rigidbody?
    • Is the "Is Trigger" field on the collider checked?
    • Is the GameObject on a layer that cannot collide with the other layer on the other object you want it to collide with?
     
  3. MrPuppyy

    MrPuppyy

    Joined:
    Nov 4, 2019
    Posts:
    40
    So I checked, here is what i found out
    • The prefab(or whatever you call it now) Does, but when i expand it and click on the object, it does not.
    • Is trigger checked? No, I have not checked this on any of my other parts. (really simple game)
    • GameObject; I've heard of this, but I can't remember where it is, sorry. But if you mean the script that triggers it hit, it doesn't because I can go through it.
    So from this maybe i need to remove the rigidbody from prefab and add it to the actual object and it might work? Thanks for replying.
     
  4. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Did you maybe remove the Rigidbody from the instance of the prefab in the scene? It will be highlighted in blue and marked as "Removed".
    If so, right click the removed component and select "Removed component > Revert".

    If that isn't the case, then this is very strange and possibly a bug. Unless you explicitly modify an instance of a prefab, it should be exactly the same when you drag the instance into the scene.

    I'm referring to layers and layer-based collision detection, where you may have one object and another object set on layers that cannot collide with each other:
    https://docs.unity3d.com/Manual/Layers.html
    https://docs.unity3d.com/Manual/LayerBasedCollision.html

    Though I don't believe this is the issue anymore. It's most likely the Rigidbody problem above.
     
  5. MrPuppyy

    MrPuppyy

    Joined:
    Nov 4, 2019
    Posts:
    40
    Alright it worked, I am able to collide now. But it has a weird collide box and I can't seem to get it around the bends with the cube collider by 'Edit Collider' like i can go in one of the indents of the cure (3 cures) and its like there is a invisible block in a way. Thanks kindly for your help