Drag & Drop

Description

The Drag & Drop behavior will allow you to "pick up" the selected object and move it any where with your finger. This behavior overrides the physics engine, and can cause some unexpected results when trying to use it with a physics based object. For physics objects you should try to build you own drag and drop system using other behaviors.

This behavior will Trigger an event repeatedly while you're touching an object.

 

Properties

Triggers Repeatedly on Event

Object A

This is the object that can be picked up and moved.

Follows X

When toggled on, the object will be able to follow your finger horizontally.  

Follows Y

When toggled on, the object will be able to follow your finger horizontally.  

Constrain Area

You can limit the area that is possible to move the object with your finger. When enabled you can select "Draggable Area" to visually drag a rectangle area. Or tap the "<" icon to enter coordinates manually.

 

Outputs

Object ID

Outputs the object's ID.

 

Examples

You can use this behavior to pick up and move an object in your scene. Great for strategy games, or world building games.

Download Example Project

 

Related

Started Touching Behavior

While Touching Behavior

 

DragAndDropReference.gif

0 Comments

Article is closed for comments.