2 questions about an on screen object

Is there a way to set an image as an obstacle, so i have a square box and if i drag anything towards it when it collides the dragging stops? like a barrier.

Can an asset or anything being dragged if it goes off screen it closes automatically or hides. maybe set an obstacle side of the screen and once it collides it closes.

I can’t find a way to implement this specific use case, however, you can use a Pinboard as constraint zone for free elements you put inside.

By design, no Asset with a Free Behavior can be dragged out of the screen in order to not “lose” them. The center of every element will be constraint to the boundaries of the screen.
However, you can set up an invisible zone, using rectangles shapes for instance, and with drag’n drop triggers and actions, have an element being closed or hidden when it’s dropped on this invisible zone.

I’ve set up a quick demo experience to illustrate this.

You can move the red square or blue circle freely in the white zone, when you move them over the light green zone, they will be hidden (added a button to “recall” them back). The border zone is green for demo purpose but feel free to put the opacity to 0 to hide it completely while still retainining its trigger/action behavior.

Community-DND-Borders.zip (6.1 MB)

Kind regards,

Alex.

1 Like