Need Help making Pong AI beatable

Alright so I just edited this post because I was able to figure out how to make the enemy paddle follow the ball. I am looking for help on how to make the computer actually able to miss the ball from time to time.

Any ideas?

I’m thinking about maybe tweaking things so that the ball’s speed is affected by possibly drag, player paddle, enemy paddle, bouncing off the walls? Anybody know how to make it so the does not always bounce in a predictable direction either?

Here’s my code - Thanks in advance! :slight_smile:

using UnityEngine;
using System.Collections;

public class EnemyAI : MonoBehaviour 
{	
	Transform Enemy;

	void Start ()
	{
		Enemy = GameObject.Find ("Ball").transform;
	}

	void Update ()
	{
		transform.position = new Vector3 
			(8.0f, 
			 Enemy.position.y, 
			 transform.position.z);	
	}
}

You will have to rewrite your Update() code to use a method that involves speed. Try