TO SQUASH: better ball collisions.

This commit is contained in:
2026-08-03 01:47:14 -04:00
parent 378efa16ef
commit 17051821b5
8 changed files with 50 additions and 10 deletions
+3 -1
View File
@@ -36,7 +36,9 @@ public class BasicBall : MonoBehaviour
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.CompareTag("Wall") || collision.gameObject.CompareTag("Ball"))
if (collision.gameObject.CompareTag("Wall") ||
collision.gameObject.CompareTag("BasicBall") ||
collision.gameObject.CompareTag("FruitBall"))
{
ContactPoint2D contact = collision.GetContact(0);
speed = Vector2.Reflect(speed, contact.normal);