본문 바로가기
개발/코드

코드) 원 운동

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;
    }

 

반응형

댓글