- Home /
Global rotation on child object ?
imagine that U have this one object structure of gameobject:
Object (scale = [2, 1, 1])
|- first child (scale = [1, 1, 1])
|- second child (scale = [1, 1, 1)
|- ........ (scale = [1, 1, 1])
- child (scale = [1, 1, 1])
we take firs child and rotate it via transform.rotation (Object won't be skewed after rotation). and Now global rotation is in eulier angles [0, 45, 0]...
the object seems to be fine, before we do next scale on group;
it's rotation is reset's to quiaternion.identity; .. how to save it's rotation and apply parent scale to current mesh (rotated cube without skew before new scale)
Answer by Map-Builder · Dec 17, 2012 at 03:21 PM
Move it out from parent, rotate it and "reparent" it
Answer by Map-Builder · Dec 19, 2012 at 01:23 AM
none, i donno why your scale is non uniform but this is not supposed to be used that way and i'm not sure there's an issue, for rotation try transform.localRotation and tweak with difference (Qdiff = Q2*Q1^{-1}) Qdiff = transform.rotation Quaternion.Inverse(transform.localRotation); // rotation from local to world so localRot Qdiff = Rot