Ball is moving randomly not precisely

Hello guys,i just finished block breaker.And decided to create my own from start without help.I did everything ok,but i wanted to ask how can i make ball bounce realistic from paddle.I mean right now no matter if i hit with right or left side of the paddle ball bounces randomly (Random.Range in code).How could i make it bounce the way i hit it.I mean if i hit with right side the ball should bounce clearly right.Any suggestions ?? I hope if i solve this the game will be ready to posting :grin: Thanks :smiley:

Hi there, what have you tried so far? Have you compared to our code? You can get to ALL videos end-state by…

  1. Visiting https://github.com/CompleteUnityDeveloper.
  2. Clicking on the section name.
  3. Clicking XX Commits at the top-left (XX will vary)
  4. Against the video you want, click the <> button on right.
  5. On final page (example) click Download Zip button.

Good luck!

Thanks,I resolved my bug, but anyways this is pretty useful to compare with my code :slight_smile:

1 Like