Unity Newbie here, any help?

Hey! I’m working on a recreation of Pong for class. I’m having an odd issue where the ball seems to phase through the walls once it picks up enough speed. I’m thinking about going back to the script that dictates how it generates the momentum when it moves and capping the max speed, but is there any other ways I should go about this? Or is that the move?

If you wanna see what I mean, this is the current build.

Square Shaped Ball Game by NyxTheNerd (itch.io)

Thanks in advance! :smile:

Do you know the difference between discrete and continuous collision detection on a Rigidbody2D?

Use Continuous for fast-moving Rigidbody2D. It’s more expensive but it won’t step over colliders if it’s moving fast (collision tunnelling)

This won’t help you if you’re bypassing physics and directly modifying the Transform though; something which you should not be doing.

Thank you so much! We did end up overriding the physics so that broke something else, but I have a few ideas on how I can remedy that. Hope you have a nice day/night!

1 Like

Good luck with your project!