Drag and Drop Event allows you to create interactive experiences where objects can be dragged and dropped with customizable parameters.
Adding a Drag and Drop Event
Here's how to use the Drag and Drop Event:
- Select the object(s) that you want to make draggable.
- On the Events panel, add a new event and select
Drag and Dropfrom the dropdown menu.
- Open the
Drag and Dropevent and customize the settings to your liking.
Settings for Drag
- Hand / Move / Default → Affects cursor appearance while hovering over draggable objects.
- Normal: the draggable object will be covered with other objects.
- On Top of All: Renders the dragged objects on top of all other objects.
- Sets the damping value for the dragged objects. Values range from 1 to 80, where higher values provide more delay.
- Aligned with Camera: The drag plane is aligned with the camera's orientation.
- Adaptive to Camera: The drag plane adapts to the camera's orientation as it moves.
- Axis or Plane: The drag plane is aligned with the selected axis or plane.
- Keep Initial Plane Position: The drag plane retains its initial position.
- Use Current Object Position: The drag plane uses the current position of the dragged object.
- World: The drag is relative to the world coordinates.
- Parent: The drag is relative to the parent object's coordinates.
- Object: The drag is relative to the object's own coordinates.
Objects to Drag
- Add objects to the list that you want to make draggable.
- Define the minimum and maximum values for the X, Y, and Z axes to limit the dragging range. Values can be arbitrary, ranging from negative to positive.
Settings for Drop
Drop allows objects to snap to specific positions after being dropped. Drop is an optional feature. Turn it on to take effect. Customize the following properties:
- Object Position: Snaps the dropped object to the position of another object.
- Surface: Snaps the dropped object to the surface it is dropped on.
- Sets the speed at which the object snaps to the target position. Values range from 0 to 40, with higher values indicating faster snapping.
- Yes: The dropped object automatically orients itself to match the target object or surface.
- No: The dropped object maintains its original orientation.
- Stay in Dropped Position: The dropped object remains in the position it was dropped.
- Return to Original Position: The dropped object returns to its original position.
- Return to Last Snapped Position: The dropped object returns to the last snapped position.
- Any Object: The dropped object can be dropped on any object in the scene.
- List of Objects: Define a list of specific objects that the dropped object can be dropped on.
Behavior on Drag and Drop
Add actions such as transitions, sounds, or creating objects that will occur when the drag and drop event is triggered.
The following actions can be added for Drag and Drop events:
- Transition → e.g.: change the state of an object if it is Dragged or Dropped.
- Sound → e.g.: add a sound effect when dragging or dropping the object.
- Create object → e.g.: spawn additional objects in the scene when the object is Dragged or Dropped.