How can I resize an image with drag-and-drop?

Before attempting to post this question here, I have spent the past day trying to create a method of resizing an image for my virtual “OS” desktop. The end goal was for me to have resizable windows, but I have seemingly exhausted every possible option that I could think of.

At this point I have a square image with colliders around the outer edges, but I can’t seem to figure out how to properly tell if they are being clicked, let alone dragged.

If anyone has any ideas, I would be very grateful. I try to not ask questions on here if I don’t have to, as I don’t want to clog it up, but I have legitimately no idea how to proceed.

Hello,
did you mean one handed resizing?


i never do this, but i will giving my idea, onbtndown you save the pos, i wil say it StartPos vector2, and on drag you will measure current pos(click draged) in ondragbtn with StartPos, if the CurPos.x > StartPos ||CurPos.x < StartPos then do resizing of image(you calculated it with your value, you can resizing per value different or divide it to get good resizing) and so on to the y value. and up to let it not resizing anymore.


Hope it help,.