rigidbody2d bounce

Hello,

I’ve stumbled upon a serious problem.

I create three square objects and placed them like this:

66240-q0.png

under them there is a simple Box Collider 2D object which they fall on to.

And the problem is no matter what I do, after the boxes land on each other after the launch

they a bit like shift off of each other, and I cant fix it.

In detail the upper block “c” first goes down to the Y -2.36 but then slides up a bit to Y -2.35.

I tried to create a material with the bounce set to 0.

Linear drag set to 0, angular set to 0, constraints on the axis X.

nothing helps.

Don’t know what do to, please help me.

Probably just some unity-collider-fun happening here. There will always be a bit of inconsistency.
If this really is a sirious problem to you, try fixing the blocks with a script when they are in the right position.

If you are not happy with this answer please comment on it and discribe what exactly you are trying to achieve :slight_smile:

Use continuous collision detection on the Rigidbody2D; it’s more expensive but it detects exact contact points. Discrete is the default because its faster and for most purpose work well however it doesn’t cast shapes like continous does so can produce overlaps or even completely tunnelling.