1 2 3 4 5 6 7 8 9 10 11 12 13 14 | private Vector3 GetCenter() { if (targets.Count == 1) return targets[0].position; Bounds bound = new Bounds(transform.position, Vector3.zero); foreach (Transform target in targets) { bound.Encapsulate(target.position); } return bound.center; } |
Nenhum comentário:
Postar um comentário