Search Unity

Colliders dont work.

Discussion in 'Editor & General Support' started by General Jackson, Oct 4, 2010.

  1. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
    Hi guys, I installed the Unity 3 free version.
    In the bootcamp demo, colliders work fine.

    But when i try to make my own level, they do not work at all. None of 'em.

    I never had a problem like this in Unity 2.

    Any help?
     
  2. oblivionfeet

    oblivionfeet

    Joined:
    Jul 24, 2010
    Posts:
    481
    Collides work, you're clearly doing something wrong. Post an example scene where they "don't work" so people can check it out.
     
  3. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    There were major changes in physics in V3, you will need to be more specific for the community to help.

    I believe there were some changes that made colliders more accurate (but disallowed certain loopholes from before). Check to ensure you have rigidbodies attached to your gameobjects. Oh, and I have noticed that you don't recieve collisions in a GO chain, if you have a GO without a collider in the chain (ie. if you have a GO with 2 levels of GOs attached, if you have a collider on the lowest GO, no collider in the middle, and your rigidbody at the top, you won't get a collision message at the rigidbody (and the lower collider won't collide with anything unless the thing it hits has a rigidbody attached - see the collision chart in the reference doc).

    Cheers,

    Galen
     
  4. n0mad

    n0mad

    Joined:
    Jan 27, 2009
    Posts:
    3,732
    The sky is collapsing.

    Because.
     
  5. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    There are holes in the mesh ;)
     
  6. n0mad

    n0mad

    Joined:
    Jan 27, 2009
    Posts:
    3,732
    LOL

    One normal has been reverted :D
     
  7. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
    All I did was put terrain down, textured and shaped it, then I put the soldier prefab down.
    It always falls through the terrain.
    So I put a box down and gave it a box collider. He falls through that.
    Then I set up another cube WITH A COLLIDER, made a sphere as a rigidbody, and it falls through the cube.

    No colliders are working, and they work fine if I do the same thing in 2.6
     
  8. defmech

    defmech

    Joined:
    Feb 24, 2007
    Posts:
    506
    I have a similar problem on one of my machines. The colliders pass through eachother with no effect or sometimes ONLY the collider interacts and the mesh its assigned to stays in place. The same install has major issues with lightmaps, too. I'm using U3 across 3 different machines and only one has these problems. Going to reinstall tonight and see if that fixes it. I assume you're using Unity 3 in Windows? The only one acting up is on Win7.
     
  9. oblivionfeet

    oblivionfeet

    Joined:
    Jul 24, 2010
    Posts:
    481
    Anyone else noticed the slowly growing number of issues people are having with colliders and Windows 7?
     
  10. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
    I'm running Vista and they dont work :(
     
  11. oblivionfeet

    oblivionfeet

    Joined:
    Jul 24, 2010
    Posts:
    481
    You just HAD to spoil my theory, didn't you!? :p
     
  12. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
  13. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Do you have a link to that collision chart you mentioned?
     
  14. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    I think it's the collision action matrix on the physics page that galent is referring to.

    @GeneralJackson: the physics settings (menu: Edit > Project Settings > Physics) has a section that marks which layers can collide with which other layers. Is this set correctly for what you are doing?
     
  15. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Want to have some real fun? Create a plane, scale it to 100x100, create a sphere and add a rigid body to the sphere, have it above the plane so it drops down onto the plane, add random force to the sphere to make it roll and watch it bounce all over the plane like it is trying to fall through the plane. Another test, create a plane, again, 100x100, create cubes randomly and have them stack or just fall, make sure they all have a rigid body attached to them, you will notice how the cubes collision is inaccurate, some sit "into" the plane, others "into" each other, we are talking simple primitives here, very simple. So far, no importing of assets, no "special" circumstances, nothing objectively out of the insane ordinary as to how you can test this, it is pure, plane and simple. I actually have a bug report with a project attached to it that allows Unity QA to click a button to make the cubes for them to witness this obvious and very unusual effect. I figured physics had an overhaul but it looks like that overhaul needs reversed.

    Case 377177

    See Video, watch the ball :)
    http://screencast.com/t/vffXbRRU

    Unfortunately all cubes are green at the moment and no way to zoom around, I will have to come up with some way to identify who is inside whom and highlight them or something
     
    Last edited: Oct 6, 2010
  16. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I see what you did there

     
  17. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hmmmm, that's not what I'm looking for. My problem is that a sphere collider set as a trigger isn't detecting a CharacterCollider inside it, when it should.


    EDIT: Ok, I believe I found a solution to my problem.

    What was happening was a trigger sphere can't detect a charactercontroller inside of it.

    Turns out that now I need to have a rigidbody attached to either the trigger sphere or the charactercontroller for the trigger to work.

    Why do this? Why does a trigger collider need a rigidbody now? Trigger collisions do not make use of rigidbody physics. It doesn't make sense to require a rigidbody for this.
     
    Last edited: Oct 28, 2010