FANDOM


The Drag & Drop behavior enables objects to be dragged and dropped either by mouse or touch. On multi-touch devices, multiple objects can be dragged and dropped at once.

An object starts dragging when a mouse click or touch falls inside the object's collision polygon. It is released when the mouse button is released or the touch ends.

Drag & Drop properties Edit

Axes Optionally axis-limit the movement, for example only allowing the object to be dragged horizontally or vertically. The default is Both, allowing the object to be dragged anywhere.

Initial state Whether the behavior is initially enabled or disabled. If disabled, it can be enabled at runtime using the Set enabled action.

Drag & Drop conditions Edit

Is dragging True if the object is currently being dragged by mouse or touch.

Is enabled True if the behavior is currently enabled; false if disabled by the Set enabled action.

On drag start Triggered when the object is clicked or touched inside its collision polygon.

On drop Triggered when the object is being dragged, and the mouse button is released or the touch ends.

Drag & Drop actions Edit

Set enabled Enable or disable the Drag & Drop behavior. If disabled, clicking or touching the object has no effect and the object cannot be dragged. It also becomes 'transparent' to clicks and touches, meaning other objects underneath it can still be dragged and dropped. If the object is being dragged when it is disabled, the drag is cancelled, but On drop will not trigger.

Drop Stop dragging the object if it is currently being dragged. This also triggers On drop.

Drag & Drop expressions Edit

The Drag & Drop behavior has no expressions.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.