[Unity - 유니티] Quaternion.Euler(x, y, z) - Quaternion 타입의 회전값 반환 함수 Quaternion qua = Quaternion.Euler(x, y, z); ex)Quaternion qua = Quaternion.Euler(10, 20, 30);=> x축으로 10도, y축으로 20도, z축으로 30도 회전시킨 각도를 Quaternion 값으로 반환. 프로그래밍 정리/Unity 2014.06.05
[Unity - 유니티] Animator, 현재 수행 중인 애니메이션 State 가져오기 - Animator.GetCurrentAnimatorStateInfo Animator.GetCurrentAnimatorStateInfo(int layerIndex)=> 현재 수행중인 Animator의 State를 가져옴.=> Animator의 모든 객체는 Hash를 이용해 접근할 수 있음.==> Hash : Integer로 되어 있는 값=> Animator.StringToHash() 함수로 Hash 값을 추출하여 비교연산을 할 수 있음.=> Animator내에서 Layer로 분리하여 상반신, 하반신 애니메이션을 별도로 제어할 수 있음.=> Layer로 분리된 애니에이션을 layerIndex를 통해서 제어할 수 있음. 레이어명=> Base Layer로 되어 있는 부분이 Animator에 레이어명 State명=> walk, attack, idle로 되어있는 부분이 State .. 프로그래밍 정리/Unity 2014.06.05