I am new to unity. Learning 2d games.
I created a ball sprite and gave it properties of Rigidbody 2D and CircularCollider 2D and gave the material properties to bounce.
Added a floor and ceiling sprites and tried both edge and box Colliders but when the ball start to bounce fast between floor and ceiling it just moving through ceiling/floor.
How to make the ball sprite remain inside the bounds of the wall ?
If the Rigidbody2D is moving very fast and/or the collider attached to it is very small compared to the other colliders it may contact then it will pass through it.
In this circumstance, you should use continuous collision mode.