unity 타켓팅 썸네일형 리스트형 [unity3d]미사일터렛 + 자동 타켓팅 및 사격 AI 추가 스크립트public Transform head;public bool headRotate;public float distance;public float rotspeed=5; 다음 내용은 업데이트 함수 내에 추가.distance = Vector3.Distance (Players.transform.position, transform.position); Debug.DrawLine (head.transform.position, Players.transform.position,Color.yellow); if (distance < 20) { fireon = true; headRotate=true; } else { fireon = false; headRotate=false; } if (headRotate) { h.. 더보기 이전 1 다음