As a small starter project, I decided to create my own version of PONG in 2D.
I have created an AI which follows the ball, however this is unbeatable. How would I implement speed, to give the player a winning chance?
using UnityEngine;
using System.Collections;
public class Player2AI : MonoBehaviour {
Transform Ball;
void Start ()
{
Ball = GameObject.Find (“Ball”).transform;
}
void Update ()
{
transform.position = new Vector2(transform.position.x, Ball.position.y);
}
}