[Unity] 화면 외부에서 오브젝트 생성
개요 적을 랜덤한 위치에서 생성시키는데, 화면 안에서도 생성되니 어색하다. 때문에 화면 밖에서 적을 생성시키기 위해 이것저것 시도해봤다. 본론 1. 원 범위로 생성 public Vector3 SpawnEnemy() { Vector3 playerPosition = _playerTransform.position; float radius = 25f; float x = Random.Range(-radius + playerPosition.x, radius + playerPosition.x); float y = Mathf.Sqrt(Mathf.Pow(radius, 2) - Mathf.Pow(x - playerPosition.x, 2)) + playerPosition.y; y *= Random.Range(0, 2) =..