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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Shaking Object

Discussion in 'Physics' started by LasJJ, Jul 27, 2022.

  1. LasJJ

    LasJJ

    Joined:
    May 31, 2022
    Posts:
    10
    Hi. I'm new to unity. When objects stack on top of each other the shake, why is this ? Sometimes they even overlap each other's collider. Is their a way to reduce the shaking or even stop the objects from overlapping each other. I have found a link on Gethub with the scenes on (BoxCollider2D_Stacked.unity) object stacking shaking - but what do you do with the code - soo I view the examples(in unity). Basically, I don't know what to do with that code. Thank you
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,622
    Those examples don't shake. nor have I ever seen them do so. Did you change any Time settings such as reducing the rate of the fixed-update or something else? Did you change anything?

    Also to add, those bodies are set to be Continuous so I'm not sure how they'd overlap. Continuous collision detection in 2D physics is solid as a rock.

    What's the frame-rate in the Editor? Maybe a video would help to demonstrate what you're seeing.

    EDIT: If you have a completely project then maybe you can host it so I can load it and take a look. Please delete the library folder first though. If you cannot host it then DM me with your email and I can set-up a workspace for you to upload. If it's just the stock PhysicsExamples2D project with no changes then let me know which branch you're using and your Unity version.
     
    Last edited: Jul 27, 2022
  3. LasJJ

    LasJJ

    Joined:
    May 31, 2022
    Posts:
    10
    Thankyou very much for your help. Sorry I wasn't clear in my first question. How do you stop squashed items from shaking ? (I didn't mean your BoxCollider2D_Stacked.unity example. that wasn't written correctly. Sorry). My objects are the ones that are shaking.
     
  4. RadRedPanda

    RadRedPanda

    Joined:
    May 9, 2018
    Posts:
    1,596
    That didn't really clear things up. Are you forcing certain objects to clip into each other?
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,622
    I wasn't suggesting you were saying that. You seemed to suggest that example is shaking and I don't see how it could do that. Yes, it's not clear what you're doing or seeing really.