After i added the following, the ball just falls off the paddle right when i push play in unity.
It also just falls off when i cycle through game over, and start new game screens.
void Update()
{
if (!hasStarted)
{
LockBallToPaddle();
LaunchOnMouseClick();
}
}
private void LaunchOnMouseClick()
{
if (Input.GetMouseButtonDown(0))
{
hasStarted = true;
GetComponent<Rigidbody2D>().velocity = new Vector2(2f, 15f);
}
}