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

Odd physics behavior with stacked objects

Discussion in 'Physics' started by fighter453, Dec 26, 2015.

  1. fighter453

    fighter453

    Joined:
    Dec 23, 2015
    Posts:
    6
    I'm trying to create a Jenga based game and I have been playing around with some basic mechanics. Since I just got the drag functionality done on the button click I wanted to increase my stack size to see how performance would be. After having a total of 10 rows I noticed that my stack would vibrate and push itself out. Seeing as I had no issue with 2 rows I dropped it down to 5 and then back down to 2 since any more rows seems to cause this weird issue. I've tried messing with the object mass, static and dynamic frictions, setting bounce to 0 and bounce combine to minimum, but I still see this issue. This only starts to happen the minute I hit play.



    Thanks
     
  2. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    For what seems to you when you pull the boxis also drag the other also as if the box were scratched, this means that the box is not smooth, it is lack of slip flange on the box.That result happens when the colliders is overlapping.
    Try add Ice meterial and reduces AngularDrag.
    I did a test with the meterial Ice and AngularDrag in 5. No problems.
     
  3. fighter453

    fighter453

    Joined:
    Dec 23, 2015
    Posts:
    6
    That seemed to fix the issue thank you. Is it possible to explain why changing the material to 'Ice' and adjusting the angular drag to '5' would fix the issue when colliders overlap?

    Edit: Ice made the blocks slide around a bit. Changing the material back to 'Wood' and leaving angular drag as '5' seems to have the desired effect.
     
  4. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    The Ice effects, let the object slide like real world ice cube.
    As in the real world, wood, rubber, metal, each of them has its own characteristics.
    For AngularDrag take a look documentation.
    http://docs.unity3d.com/ScriptReference/Rigidbody-angularDrag.html
     
  5. fighter453

    fighter453

    Joined:
    Dec 23, 2015
    Posts:
    6
    I looked at the documentation, but I still don't understand how slowing down the rotation fixed the issue
     
  6. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    In Rigidbody->Constraints-> freeze Rotation x,y or z.
     
  7. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    also you may want to remove the mass almost completely, as this contributes to compression / vibration. (depending on your needs)