AI Interaction

using UnityEngine;

using System.Collections;

using System.Collections.Generic;

public class Enemy : MonoBehaviour {

public Rigidbody enemyRB;

private int pathLength;

public List enemyPath;

//Use this for initialization

void Start {

if (!enemyRB)

enemyRB = this.GetComponent;

pathLength = enemyPath.Count;

}

// Update is called once per frame

void Update {

for (int i = 0; i < pathLength; i++)

{

if (i == pathLength)

{

i = 0;

continue;

}

while (transform.position != enemyPath[i].transform.position)

{

transform.LookAt(enemyPath[i].transform.position);

enemyRB.AddForce(Vector3.forward);

}

continue;

}

}

}

Working on Developing Pathfinding for the AI, some way for the Antibodies to move around as a whole.

This iteration will be dealing with a list of Game Object Points in the world that the Antibodies travel to. Working on debugging first, once this works will add a break for player detection that lets the enemy begin to pursue the Submarine.