Hi eli0s,
So, what happens when the object touches the orange frame? It resets its position at the startx, starty coordinates?
The object just can not cross the orange sprite and must continue to be dragged without release the mouse button.
[quote:3vhrwoh3]Nevertheless, what you really need is a "Pick" action, as opposed to the "Drop" that the Drag&Drop behavior already has. That way you would drop the object every time it overlaps and pick it up again automatically if the mouse were still pressed.
This solution seems to be interesting. Could you make an example using CAPX that I have shared?
[quote:3vhrwoh3]To be honest, I can't think of something useful. The closest I got is without using the Drag&Drop behavior, with a simple "set position to" mouse.X, mouse.Y action (you can lerp it for smoother movement) and a boolean that becomes false when the object overlaps with the container and stops the "set position" action. The problem is that when it stops the overlapping and we re-enable the "set position", the result is a jagged movement as the object collides and re-collides constantly with the container. Also, if you sweep the object fast enough, you can even pass thru the container, since the 60fps aren't enough to check for the collisions.
It's true. I tested it and didn't work.