August 2018
Beginner
334 pages
10h 19m
English
We can now proceed to implement our facing algorithm that derives from Align:
using UnityEngine;
using System.Collections;
public class Face : Align
{
protected GameObject targetAux;
}
public override void Awake()
{
base.Awake();
targetAux = target;
target = new GameObject();
target.AddComponent<Agent>();
}
void OnDestroy ()
{
Destroy(target);
}
public override Steering GetSteering() { Vector3 direction = targetAux.transform.position - transform.position; ...Read now
Unlock full access