My Brick Breaker game is not working.

I’ve been trying to follow this. There are 2 problems with mine:

  1. The ball bounces off the paddle straight 95% of the time.
  2. It doesn’t detect a game over.

Could anyone assist me in discovering what’s wrong with my game? I’ve been looking at it a while, and I’m not seeing where I’ve coded it wrong.
`**(???)`[/B] [/SIZE][/SIZE][/COLOR]** **Please figure out how I messed this game up and I'll be able to make note of it. This way I hopefully won't repeat my errors in the future.**

How are you calculating the angle it bounces?
What is the game over trigger supposed to be?

My angle calculations are

void OnCollisionEnter2D(Collision2D target)
    {
        if (target.gameObject.tag == "Racket")
        {
            float x = WhereToGo (transform.position, target.transform.position);
            Vector2 dir = new Vector2 (x, 1f);
            myBody.velocity = dir * speed;
        }
    }

}

And my game over trigger is

if (target.tag == "BottomBorder")

My code seems fine to me, but the whole Unity game development system is basically all uncharted territory here.

Consider a generous amount of Debug.Log statements which will show in the Unity console window.

Debug.Log ("Target tag is " + target.tag);

if (target.tag == “BottomBorder”)…

void OnTriggerEnter2d (Collider2D target)
    {

        Debug.Log ("Target tag is " + target.tag);

        if (target.tag == "BottomBorder")
        {
            Debug.Log ("You Lose! Ha-ha!");
            Destroy (gameObject);
        }
    }

does nothing. Maybe I’m misunderstanding you?

Check your method names for correct capitalisation - capitals are important.

I just found the error in my game. I forget where it was, but it was a simple misnaming of … something…

It was wrong and I made it right…

Thank you for your assistance offer though!

Does nothing? Then that is your issue, if OnTriggerEnter2d isn’t even firing. I would expect output to the console. I didn’t imply that this would fix the issue, but rather a technique for debugging. Target.tag better be exactly equal to “BottomBorder” or you have a likely misspelling.