Shaking problems

Hello there!
I would need some help with a tough problem!
How do i reduce the shaking of object1 thats placed under object2, object 1 is shaking because object2 is too heavy!
I know i can reduce the density or mass of object2 but the thing is i have too many objects in my game and i would go for a more general solution.
You guys know the solution?


Also same thing, how can i reduce the shaking of a body if i force it through the ground, ground which density is 0. Also if i force an object through another it also shakes.
The Forcing is done with mouse joint like i drag an object and move it around.

Im using box2d 2.02.

Sorry for my english!
This is a usual effect with Box2D. It's suggested in the Box2D manual to not place small light things under big heavy things because of this fact.

You could try to reduce the restitution (defined in the shape definitions), but I don't think that's the problem.

You could also try to change the relative sizes of the objects (and changing the pixel-to-meter ratios to keep the same size visually), but I'm not sure if that will solve anything either.
Yes, it sounds kinda like what happens when you have bodies that have very different masses, and a little one get sandwiched between bigger ones. If the scene permits, you could try to make the masses more similar.

Original thread: https://box2d.org/forum/viewtopic.php?t=8579