breakout clone respawn change direction

when the ball respawns it fires straight down and is hard to catch because it respawns in a random position so i need it to go upwards.
heres my script

private void ResetBall() {
 _t.position = new Vector3( Random.Range( -Player.XBoundry + 2, Player.XBoundry - 2), 0, Player.ZPosition );
 _t.LookAt( GameObject.FindGameObjectWithTag( "Player" ).transform.position );
 
 rigidbody.AddRelativeForce ( new Vector3( minspeed, minspeed, minspeed) );

 }

any help is greatly appriciated,
thanks

Your code is slightly confusing, I would suggest changing the name “_t” for two reasons:

  1. in all of the code I’ve read before a “_” means “Don’t touch this”
  2. t doesn’t really explain what it is, I can only guess it’s a cache for your transform?

This will make it easier for others to read AND it will help you remember what you did when you revisit your code later.

Back on topic:

What reference frames are you in? have you tried reversing or zeroing out any of the minspeeds in

new Vector3( minspeed, minspeed, minspeed)

To be honest most breakout games I’ve played spawn the ball in the middle of the paddle and let you launch it with mouse click or something if this is your first game you might want to try that out as a good exercise.