I am working on a prison break type game, in the game you can complete the level by getting in the car waiting outside the prison, the car will drive itself near the player as soon as the player enters the boxcollider(is trigger) set on the doorway, i can get every thing else to work, but for some reason the car doesn’t move towards me, and after doing some changes, it spawns near the collider.
here’s he script
public float Carspeed=10;
public float Accceleration=10;
public Rigidbody cr;
public Transform Goto;
public bool isColliding = false;
void OnTriggerEnter (Collider col)
{
//isColliding = true;
if (col.gameObject.tag =="Player")
{
isColliding = true; // for debug
cr.AddForce (0, 0, Carspeed * Time.deltaTime);
}