Unity/C#2022. 1. 26. 13:43[Unity] 카메라 장애물 회피
요런기능을 말함 필요한 변수와 함수 public float cameraSphereRadius = 0.2f; public float cameraCollisionOffset = 0.2f; public float maximunCollisionOffest = 2.2f; private void HandleCameraCollision(float maxDistance, Vector3 startPos) { targetPos = 0f; RaycastHit hit; Vector3 dir = (transform.position - startPos).normalized; Debug.DrawLine(startPos, startPos + dir * maxDistance, Color.red, 0.5f); if(Physics.Sph..