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

4.5 2D Collisions - Boxes rolling and wobbling

Discussion in '2D' started by CartwheelGames, May 27, 2014.

  1. CartwheelGames

    CartwheelGames

    Joined:
    May 24, 2011
    Posts:
    29
    I just upgraded to newest version of Unity that was released today, and the new 2D physics changes make things look really odd. For instance, I have an L-shaped object that consists of 2 BoxCollider2Ds parented to a game object with a RigidBody2D. When dropped onto the ground collider, the object rolls around a bit like a circle collider, then see-saws before finally settling.
    Before, it would just drop and fall over, like I wanted, now it wobbles about. Similar wobbling happens when a plain box collider is dropped.
    I've tried tweaking the 2D settings, but I can't get the physics to act as they did before the update. Any suggestions, aside from downgrading?
    Thanks.
     
  2. Arttut

    Arttut

    Joined:
    May 27, 2014
    Posts:
    4
    After upgrade I experienced almost similar problems with CircleCollider2D. It's not rolling properly (like it did before update). It almost just slides down the "hill". I tried also tweaking the settings, can't get it work like before update.
     
  3. Pyrian

    Pyrian

    Joined:
    Mar 27, 2014
    Posts:
    301
    I would recommend experimenting with the new Rotational Inertia property. They substantially changed how rotational inertia works, which seems likely to be related to both your problems.

    From the release notes:

    •2D rigid-body rotational inertia no longer scales with collider size but rather with the rigid-body mass.
    ...
    •Can now set the Rigidbody2D rotational inertia.
     
  4. Arttut

    Arttut

    Joined:
    May 27, 2014
    Posts:
    4
    Thanks Pyrian. Worked for me!
     
  5. pumpkinszwan

    pumpkinszwan

    Joined:
    Feb 6, 2014
    Posts:
    214
    OK, you're on to something with the inertia. If I tweak my rigidbodies' inertia I can get them to behave more like they did in 4.3. However, it means I will have to tweak all my prefabs and get the correct inertia through trial and error.
     
  6. CartwheelGames

    CartwheelGames

    Joined:
    May 24, 2011
    Posts:
    29
    Thanks for the lead, but no matter what I set the inertia to, I can't get it to work like it did before. I basically have to remake my game because the 2D physics are so different now. This is very inconvenient.
     
  7. vapgames

    vapgames

    Joined:
    Aug 25, 2012
    Posts:
    9
  8. -chris

    -chris

    Joined:
    Mar 1, 2012
    Posts:
    99
    Unity is fixing it... probably best to just wait.