Hi there!
I'm running into some trouble programming the opponent in this Pong clone where I want it to predict where the ball would be when it's coming towards it at the paddle zone. What I'm using to predict the ball's position relative to the Z-axis (which is where the the paddles move freely) is raycasting, tags, layers, and colliders; those are checked if the difficulty setting is on medium or hard mode when the ball triggers the opponent's ball detector.
The code and some debugging output is provided here:
http://answers.unity3d.com/questions/1229543/gpd-pong-trouble-with-raycasting-for-opponents-loo.html
What I'm basically doing in those difficulties is having the opponent predict the position in only two cases: when the ball has a straight path towards the opponent, and when the ball is one collision from the walls away from the opponent's strike zone (as some sort of look-ahead from a bounce).
Please take a look and help me out. Any resources you think I should look at can be helpful too, as I am definitely a beginner developer.