Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Updated a 2D project from U4 to U5, physics broken?

Discussion in '2D' started by IbQuezada, Mar 5, 2015.

  1. IbQuezada

    IbQuezada

    Joined:
    Aug 8, 2014
    Posts:
    2
    As the title says, I recently upgraded a 2D project from Unity4 to Unity5, all went smoothly, until I pressed the run button, all my objects/prefabs with a rigidbody2D and an animator started "falling" up... is it me or what?
     
  2. IbQuezada

    IbQuezada

    Joined:
    Aug 8, 2014
    Posts:
    2
    Oops, it was my fault, I had a script altering a prefab's velocity, but it's weird b/c unity4 didn't care
     
  3. AdamBradders

    AdamBradders

    Joined:
    Mar 26, 2014
    Posts:
    8
    I have a similar issue with BoxCollider2D since updating. BoxCollider2D won't collide with EdgeCollider2D.

    Drop a prefab in the scene that has a BoxCollider2D attached and it'll fall straight through the floor (which is EdgeCollider2D). Switch the collider to a CircleCollider2D and it works fine (which indicates it's not a layer issue or whatever).

    Haven't had much chance to look into it thoroughly (only spent 30 mins messing with it), but hopefully it's just something simple I need to change.

    -Adam
     
  4. AdamBradders

    AdamBradders

    Joined:
    Mar 26, 2014
    Posts:
    8
    OK I figured out my problem, here's what the problem was if anyone else has a similar issue;
    I had to change a setting under Project Settings->Physics2D. I had previously set the 'Max Penetration For Penalty' setting to 0.001. This worked OK under Unity 4, but in Unity 5 a setting this low will result in your box colliders no longer colliding at all. So I changed this value to 0.005 and it seems to work again.

    -Adam
     
    theANMATOR2b likes this.
  5. AlenBrk

    AlenBrk

    Joined:
    Feb 17, 2014
    Posts:
    33
    FYI:
    I had also an issue with the velocity, the gameobjects did't want to fall down they just stay or move slowly because
    Root Motion was active.. deactivating the root motion has solved it
    https://www.youtube.com/user/Unity3D/videos

    -Alen