My UI image keeps flipping when i try and drag to rotate it. Code (CSharp): public void OnDrag(PointerEventData eventData) { Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); mousePos = mousePos - target.transform.localPosition; angle = Mathf.Atan2(mousePos.y, mousePos.x) * Mathf.Rad2Deg; target.transform.localRotation = Quaternion.Euler(0, 0, angle); } im not sure why. but as you can see i have a Empty GameObject. A UI image is attached to that, with another Ui Image that is the border, the border then contains 2 more images. One rescales the object and the other for rotating. The rotating image has the above code attached to it. The target is the StickerPrefab itself that serves as the parent of the other images.
StickerPrefab -> The Parent Sticker -> The actual sticker BorderHolder -> The Dotted border. Rotator -> Used to rotate Rescaler -> used to scale up and down