Where to add the physics material for bounciness

We’re adding the physics material to the ball. We could add it to the paddle or blocks as well. Do you have any tips or guidance on where it’s best to add the physics material in a situation like the Block Breaker game?

You should read the final lines up there.

To use a Physics Material 2D, simply drag it onto an object with a 2D collider attached or drag it to the collider component in the inspector.

I think the OP knows that. The question is, as all of the objects have a 2D collider attached to them, which of these objects would you preferably use the material on, the ball itself, or the objects it bounces off of?

Yeah, that was what I was wondering. Which of the objects is the right place to attach the material?
Just thinking further, I guess it makes sense to model it as close to real life as we can? If it’s a rubber ball against a wooden floor then appropriately the ball has to have rubber-like characteristics and the wooden floor should behave like wood.
Or do we just tweak them all and find the right combination? I suppose that has it’s own merits too.

In the game as we’re building it in the course, the material is used on the ball. That makes sense to me, as it allows you to assign default behavior to the ball in that way. You could also have a bumper with a 2D collider that uses a material that will speed up the ball, or maybe slow it down. Maybe certain blocks can also change the default behavior of the ball on collision. So that’s how I see it now. The material on the 2D collider attached to the ball determines the ball’s default behavior, and the material attached to 2D colliders in the world around the ball change it’s default behavior. It would be nice if Rick or Ben can let us know their take on this.

1 Like

Privacy & Terms