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:
Answer by _Yash_ · Jul 07, 2016 at 12:55 PM
This is because it's parent's scale is not uniform. try this, create a cube and an empty object. now make cube the child of empty object. if you try to rotate cube, it will look fine. now detach cube from empty object(un-parent), change the scale of empty object and then again attach cube as child. now if you rotate the cube it will deform. This is the same thing happening to your head object.
Solution
you have to add an empty object in between head and it's current parent. this new object's scale should be such that it's global scale is uniform(all x y and z are same). what you see in inspector is local scale. Easy way to calculate the scale of this new intruder object is invert the scale of parent. if parent's scale is 2 1 4, intruder's scale will be 0.5 1 0.25.
Your answer
Follow this Question
Related Questions
Game object rotate with the camera on y axis 0 Answers
Clamp without Quaternion? 0 Answers
Check GameObject rotation in Y axis when OnTriggerEnter 1 Answer
Locking facing direction or changing it after following the mouse position 0 Answers
Rotate GameObject with children around itself on mouse drag 1 Answer