20190226 작업노트
2019.02.26 19:28

각도로 원의 둘레 좌표(x,y)값 찾아내기



private int[] degree = { 30,60,90,120,150,180,210,240,270,300,330 };


float radius = 0.00009f;


double r = degree[i] * Math.PI / 180;


BigSpot.Read_latitude = Math.Truncate((Mylatiude + Math.Cos(r) * radius) * 1000000) / 1000000;

BigSpot.Read_logitude = Math.Truncate((Mylogitude + Math.Sin(r) * radius) * 1000000) / 1000000;





LookAt(대상을 쳐다보는거) 반전



  1. var target : Transform;
  2. function Update ()
  3. {
  4. transform.rotation = Quaternion.LookRotation(transform.position - target.position);
  5. }