After adding instantiated prefab to parent I want to rotate that new prefab around self Center.
GameObject clone = Instantiate(mockup, transform.position, transform.rotation) as GameObject;
clone.transform.parent = gameObject.transform;
clone.transform.localPosition = Vector3.zero;
clone.transform.Rotate (0, 45, 0);
But it misshape prefab. In case when I not set parent it rotates without misshaping. I tried also RotateAround and pass clone.transform.localePosition
as parameter but still the same.
I tried also to get center as
clone.GetComponent<Renderer>().bounds.size;
and add to position and that pass as parameter but still no success.
How to rotate object around self center without any misshape ?
Misshape: camera is above and I scale and rotate cube but from above it is not rectangle as it should be
without rotation: