How Can We Help?
Print

Drag & Drop System (legacy)

Note: This page is for Zoe for Unity 1.x. Click here if you are using a more recent version.

Drag & Drop is the ability to set a target place for an object to go into (in this example, the hat is dragged and dropped on the character’s head). This feature is extremely useful to define snapping zones for any type of experience if you want your user to place an element at a specific spot.

Follow the steps below to setup the Drag and Drop for a given IO:

  1. Create an IO that will be the object that is dropped inside a target (see the Create Interactive Objects section to know how to do it);
  2. Check Enable Drag And Drop at the root of the Object;
  3. Now you can setup the options.

Drop Targets

  • You can choose any object in the scene to be your drop target. 
  • Alternatively you can generate automatic targets by entering the number of targets you want and clicking on the GENERATE button.

A Drop Target will have specific interactions already set inside that define its behaviour when an object is dropped or removed. You can change them or remove them.

Warning:  in this version of the plugin, when a target is generated it will clone all the interactions you already have inside your object, so make sure to remove them or change them according to your needs.

Drop Requirements

Set here the requirements for how the user needs to place an object on a target in order to do a valid drop.

  • Min Distance for Valid Drop: the distance between the drop object and the drop target. If not within this distance, the drop is not allowed.
  • Match orientation on X/Y/Z Axis : check these if you want the drop object to match the orientation of the drop target (choose among axis) in order to allow the drop. 
  • Allow mirror: this option is available if an axis is mandatory. It allows you to validate the drop if the object matches the axis orientation both in positive and negative directions. This is useful for objects that don’t necessarily have a front/back, objects that are symmetric like a cylinder, etc).
  • Angle Threshold: represents the precision in which the orientation of the drop object on the drop target should be as a percentage. I.E. if the threshold is set to 100 it means the object needs to match at 100% the axis orientation. This is useful for setting the level of difficulty to the user when dropping an object into a target.

Drop parameters

  • Allow drop on occupied targets: allow to drop an object on a target even if another drop object is already there.
  • Lock after dropped: lock the object at the target position when it has been dropped.
  • Snap on drop: snap into target’s position when object is dropped.
  • Snap before drop: snap into target’s position when close to the target but not yet dropped (for the user to understand it can be dropped).
  • Time to Snap: duration in seconds of the transition for the drop object to match the target position when the user releases it into the target.
Table of Contents