- Home /
Child Sprite Skewing
I have a Tank game object that is comprised of a body and a cannon. The cannon is a child of the body. If I rotate the whole game object the tank looks fine but if I rotate just the cannon part is skews and scales. Is there anyone that can tell me why this happens and how to set it so the child sprite rotates normally
try localRotation ins$$anonymous$$d of rotation. or Transform.localEulerAngles
Answer by robertbu · Mar 25, 2014 at 04:42 PM
The likely problem is that you have a non-uniform scale on the tank base, so as the cannon rotates to be aligned with a different axis of the tank base, you get different scaling. If the canon-base is a sprite, then the solution is to author to the correct aspect ratio. If it is a mesh, then re-author it in your modeling program. Note that you can scale things up and down, but x, y, and z need to have the same value.
Your answer
Follow this Question
Related Questions
Top Down Sprite Facing Mouse 2 Answers
Rotating a Sprite to face mouse / target? 2 Answers
Rotate object via script like in editor 1 Answer
I drag a rotated object to a parent - and it has totally different rotation. 1 Answer
Lerp Rotation broken 1 Answer