I’m trying to rotate a 2D object, but using as a center its corner. I’ve tried the following:
a.transform.localRotation = Quaternion.Euler(0f, 0f, 90f); a.transform.Rotate(0f, 0f, 90f, Space.World); a.transform.RotateAround(a.BottomRightPivot, Vector3.forward, 90f);
where a is my game object, and a.BottomRightPivot is the world coordinates of its bottom right corner.
I want the object to rotate around an axis passing through its bottom right corner, parallel to Z axis (or perpendicular to the 2D plane of unity 4.3’s 2D scenes). This way, the position of BottomRightPivot should remain the same, but the position of the object (its center) should move 90 degrees around the pivot/corner.