I have a question about objects using a UIDragDropItem script, and constraining them to a background object.
I am making a colour picker. I need to drag a cursor around on a coloured background.
This is easy to do, as per examples - cursor is a sprite with UIDragDropItem script, background is a sprite with UIDragDropContainer script.
However, I want to constrain the cursor so it cannot be dragged off the background sprite , but remains visible at the edge of background sprite when the drag leaves it.
What is the best way to do this?
I can put the background sprite on a UIPanel, and turn on clipping - this means you can't see the cursor when it is dragged off the background, but I want it to remain visible at the edge.
What does "Constrain but dont clip"? on the UIPanel script do?
I suppose could intercept the cursor's UIDragDropItem callbacks, and update the position so it remains on edge of the background?
Whats the recommended way to do this?
Thanks
Artrageous