Hi,
I have quite a few objects that get large geometry distortions.
I've been working under the assumption that the cause of this is a combination of non-uniform scaling on the parent and arbitrary rotation of the child (from the unity scripting manual under lossyScale), however nothing I do seems to fix the problem.
All the parent objects have a scale of 1,1,1, and, just to make sure I've put this script on the parents as well:
function Awake () {
gameObject.transform.localScale = Vector3.one;
}
The children objects do all have odd rotations (they were originally set to regular numbers, but 90 seems to become 90.000001 or 89.999999 etc), but I even tried to counter this with the following script:
function Awake () {
transform.eulerAngles.x = Mathf.Round(transform.eulerAngles.x);
transform.eulerAngles.y = Mathf.Round(transform.eulerAngles.y);
transform.eulerAngles.z = Mathf.Round(transform.eulerAngles.z);
}
Our game is literally riddled with this problem, and it seems to be happening to more and more objects, and I've simply run out of ideas on how to fix it.
Thank you in advance for any advice!
Yours
Miriam
ps. un-parenting everything really isn't an option - the scene would become insanely messy and unmanageable.