How do I get this 2D ball/wall bounce working?

I’ve got a top-down 2D scene, with X to the right, Y up, and Z (unused) into the screen.

In the scene are:

  1. A ball object with a capsule collider with Unity’s standard bouncy material and rigidbody with Z position frozen and X and Y rotation frozen and gravity off, and a script that uses rigibody.AddForce to start movement along the X axis to the right towards the wall
  2. A wall object with a box collider and a rigidbody with gravity off

In the Physics settings, I’ve set the bounce threshold to 0.

What happens is the ball properly moves towards the wall but it doesn’t bounce off. It collides and goes the other way, but much slower without any bounce, with the same behavior as when there’s no bouncy material. It’s as if the bouncy material doesn’t exist. What am doing wrong?

I figured it out! What I was doing (and should have mentioned in my question) was that I had the wall frozen. So the energy from the ball was transferring to the wall, leaving little left for the ball. What works is either (1) not have a rigidbody on the wall at all or (2) make the rigidball NOT frozen but with a very high mass, so that the ball bounces off.

I wouldn’t set the bounce threshold to 0, that might be your issue. You could also try adding the bounciness material to the wall object.