본문 바로가기
개발/코드

코드) 원 운동

by 테샤르 2020. 3. 3.

원 운동

 

 public Vector3 GetAnglePosition(float _angle, float _radius)
    {
        Vector3 returnValue = Vector3.zero;
        returnValue.x = Mathf.Sin(Mathf.Deg2Rad * _angle) * _radius;
        returnValue.z = Mathf.Cos(Mathf.Deg2Rad * _angle) * _radius;

        return returnValue;
    }

 

반응형

'개발 > 코드' 카테고리의 다른 글

코드) Unity - 바이트를 기준으로 String 짜르기  (2) 2020.03.25
코드) 카메라 줌 (Camera Zoom)  (1) 2020.03.15
코드) Debug Circle  (0) 2020.02.28
코드) 리스트 랜덤  (0) 2020.02.28
코드 ) 부채꼴 충돌  (0) 2020.01.20

댓글