Applying Bounce material on Circle Collider 2D vs applying to Rigidbody 2D

So in Bounce Breaker lecture 6, we’re adding the Bounce material to our ball, the ball has a Rigidbody 2D and a Circle Collider 2D, we’re adding the material to the second one, what is the reason for this? I tried adding it to the Rigidbody as well and the results seem the same.

Thanks!

If you attach the material to the rigid body then all colliders will have that material, but if you have multiple colliders and want them all to have different materials then you assign the material to the collider

You mean if the object has multiple colliders, then all colliders would have that material? And to avoid that it’s better to add it to the Circle Collider?

If your gameobject has multiple colliders and you want them all to have the same material, just add it to the rigid body, but if you want to customize it you just assign each collider with different materials, but in your case, since there’s probably only one collider it doesn’t matter which component you assign the physics material

Hi @pilfton,

Have your questions been answered?


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms