I have script that is supposed to make an object look at and follow another making very simple AI; however, whenever I try to use the script it always sends the object in the opposite direction of forward ie it moves away instead of moving to the object.
using UnityEngine;
using System.Collections;
public class AI : MonoBehaviour
{
public GameObject Player;
void Start()
{
}
void Update()
{
Debug.Log("here");
transform.LookAt(new Vector3(Player.transform.position.x, transform.position.y, Player.transform.position.z));
transform.Translate(transform.forward);
}
}