void Update() { Vector3 heading = target.position - transform.position; dirNum = AngleDir(transform.forward, heading, transform.up); }