# How can I make 2D physics bounce the same as the 'multiply' bounce combine mode as seen in 3D Physics materials

In 3D physics materials, we have the setting of ‘Bounce Combine’ which dictates how the two physics materials bounciness values combine together to determine the overall bounce of the collision.
The choices are Average (of the two bounciness values), Minimum, Maximum, and Multiply which just multiplies the bounciness values together

Multiply is the mode I really want, but this setting of ‘Bounce Combine’ is just not available at all for 2D Physics materials, and the way it works by default is the equivalent of ‘Maximum’ in 3D.

One thing I tried to get multiplicative bounce was setting physics materials bounciness to 0 and instead use my own Bounce code:

``````void OnCollisionEnter2D(Collision2D collision)
{
float multipliedBounce = bounciness * collision.otherRigidbody.GetComponent<Phys>().bounciness;
foreach (ContactPoint2D contact in collision.contacts)
{
Vector2 impactVelocity = contact.relativeVelocity;
float velocityInNormalDirection = Vector2.Dot(impactVelocity, contact.normal);
Vector2 force = contact.normal * velocityInNormalDirection * rb.mass * multipliedBounce;
}
}
``````

This kinda works, but I feel like I’m doing something wrong because it doesn’t act the same as the equivalent bounciness on a normal physics material, it bounces less on flat ground, but sometimes goes chaotic when colliding with other dynamic things, especially with box shapes, who’s contact points can be in the far corners of the shape.

I would like to know if I’m doing something wrong in this code, or if there’s any other solution entirely.
Thanks!

Now i’m wondering if it’s possible instead to set Phys Materials bounciness to 1, and just modify the resulting velocity on the collisions instead according to my own bounciness, that sounds simple enough for bouncing against immovable kinematic surfaces, but with multiple moving objects I’m not sure where to even begin