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