차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
unity:rotation [2015/05/21 14:02] – 문서가 unity3d:rotation에서 unity:rotation(으)로 옮겨졌습니다 V_Lunity:rotation [2018/02/22 03:04] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
 +{{tag>rotation}}
 ====== Rotation ====== ====== Rotation ======
  
 +====회전 초기화====
 +<file csharp>
 +// Reset the world rotation
 + transform.rotation = Quaternion.identity;
 +</file>
  
 ====특정 방향벡터에서 쿼터니언 얻기 ==== ====특정 방향벡터에서 쿼터니언 얻기 ====
- +  Quaternion value = Quaternion.LookRotation( target.position ); 
-Quaternion value = Quaternion.LookRotation( target.position ); +
  
        
줄 15: 줄 20:
  
 ====특정 x,y,z각으로 회전 ==== ====특정 x,y,z각으로 회전 ====
- +  
-transform.rotation = Quaternion.Euler( x, y, z); +  transform.rotation = Quaternion.Euler( x, y, z); 
  
 해당 각으로 회전한다. 오일러 회전처럼 축이 변화하지 않으므로, 동일한 값은  해당 각으로 회전한다. 오일러 회전처럼 축이 변화하지 않으므로, 동일한 값은 
줄 97: 줄 102:
  
  
-{{tag>rotation}}+