참치김밥은 최고의 한식이다

[Unity] 오브젝트 회전하면 크기 이상해질 때 본문

Unity

[Unity] 오브젝트 회전하면 크기 이상해질 때

l__j__h 2023. 8. 2. 16:26

출처 : https://discussions.unity.com/t/gameobject-deforms-when-rotation-changes/168728

 

gameobject deforms when rotation changes

I have made a cubic character and im trying to change his head’s rotation, but when the head is attachde to the body, it horribly deforms. hoever, it seems to work just fine when i change the rotation while the head is outside the body:

discussions.unity.com

 

원인 :

회전하는 오브젝트의 Scale이 Uniform하지 않아서 발생하는 문제(즉, scale이 (1,2,1) 이런 식으로 되어있는 경우)

 

해결 방법 :

1. 빈 오브젝트를 생성한다.

2. 회전하려는 오브젝트빈 오브젝트의 자식으로 넣어준다.

3. 회전하려는 오브젝트의 scale이 (1,1,1) 등, x,y,z값이 같아도, 의도했던 크기를 표현할 수 있도록 부모 오브젝트(빈 오브젝트)의 scale을 조정해준다.

4. 이제 회전하려는 오브젝트의 rotation을 조절해보자~!

728x90