[Both Rob’s and Joao’s Solution is required to solve the issue check for both if you have this problem]
Some Bricks in my game appear to be ok but when the ball is collided it appear to be missing some bricks as if the brick is transparent. Does anyone have any Idea why this happens??
Please refer to the video below. This happens with paddle too and even with other bricks.I have tried to replace the bricks but the problem remains the same.
Regarding the blocks, most likely one of two things;
the Z index of the Blocks Transform component
missing sprites from the Block hit array
You want to ensure that your Blocks are in front of the background, with the paddle and ball all using the same value.
If it’s a case of missing sprites this is easy enough to check for your Block prefabs, just drag in the corresponding sprite to use for the damaged Block.
You mentioned that this is happening for the paddle also, that to me suggests it’s more likely going to be the Z index issue above, as you don’t change the sprite for the paddle (in the course) on a collision.
Thank you for the help I have corrected the z-index and re created the blocks using new sprites and pre-fabs but it still appears to me as my ball is overlapping the bricks. Check the video and tell me.
There is another concern that if I don’t click the ball can move in and out of the box that I have created in the game(Check the video) as if there is no collider, is that a problem??
This overlapsing bug is because of the collision detection mode, your ball collision mode is under discrete so it will only detect the collision when the frame updates. If you set it to continuous it will detect it even between frames (you can change it within the ball inspector)