The Drag entity allows a model to be moved and positioned within a scene using mouse or touch input.
Applying the drag entity to a node enables it to be dragged within a scene.


Please note
For a model to be dragged within a scene a surface must exist to allow it to be positioned.
When a model is dragged a (hidden) ray is cast that detects a surface so a position in the 3D space can be determined.
The drag effect starts when the object comes into contact with other geometry in the scene.
If the object is positioned away from other geometry, the drag will only begin when the object hovers over other geometry.
Any transform position co-ordinates, applied to the object, will be overridden once the drag starts.
Drag uses the default camera or any other camera entities added to the scene.
Nodes can be dragged between cameras within the same scene.
The object will be dragged about its origin regardless of the selection point.
When the object is selected a ray is cast (based on the mouse location and node origin) into the scene.
The position of the node is then set to be the closest part of the drag surface that is hit by the ray.

Dragging a model when the 3D document is viewed in a 3D Preview control is done by the following methods:
| Primary mouse button click and move the item (on devices using a mouse) | Touch and move the item with a single finger (on touch enabled devices) |
|---|---|
![]() | ![]() |
The primary mouse button is set in Windows system settings. By default this is usually set to the Left button. When set to Right the right button will become the primary mouse button. | |
The following special variables are populated with information from this entity:
Populated with the address of the Drag Entity's node (the node the Drag Entity has been applied to) during both the On Start Macro Name and the On End Macro Name.
The address does not contain the 3D document name.
For example:
Root\Object
This is populated when the On Start Macro Name is set.
Populated with the address of the node that was clicked.
The address does not contain the 3D document name.
For example:
Root\Object\ChildNode
This is populated when the On Start Macro Name is set.
The values sent to the DWTouchPointHitPosition are the XYZ values (absolute and vector) of the point in a 3D Preview control where the Drag Entity was clicked.
For example:
93.69|168.65|500|0|0|1
There is a priority order for entities that can affect the position of a node.
For example, if a node has an enabled Animate Translation entity and an enabled Drag entity, the Drag entity will not function until the Animate Translation entity has been disabled.
The priority order is as follows:
When using multiple entities that affect the position of the same node, ensure there is a mechanism for disabling position affecting entities before expecting another entity to function.
With the model node selected and the Drag entity added to the node, the following will be displayed in the Information Panel:

Allows the Drag entity to be enabled or disabled.
Disabling the Drag entity will disable the node from being moved in the scene.
A rule can be built for the enabled parameter by double clicking the Drag Enabled property from the Parameter Panel.
A specified surface can be set that allows the item to be dragged onto.
When a Drag Surface is not set the drag surface default to the Root node.
Enter the node address of the geometry that is to be the Drag Surface.
For example:
Root\Ground Plane\Ground Plane\DragSurface
Right click (secondary mouse button) on the node required to be the Drag Surface in the Feature Panel and select Copy Address.
Paste this directly into the Drag Surface parameter.
A rule can be built for the Drag Surface parameter by double clicking the Drag Surface property from the Parameter Panel.
A macro can run once the node with the Drag Entity is selected in the 3D Preview control.
Enter the name of the macro to run on start, for example:
ApplyOutlineGlowToDragSurface
A rule can be built for the On Start Macro Name parameter by double clicking the On Start Macro Name property from the Parameter Panel.
The value or result of a rule, placed in the Macro Argument property, is passed into the special variable DWCurrentMacroArgument (see Info: Special Variables).
Using the Macro Argument property allows the same macro to be used, but with differing outcomes depending on when it is run.
Enter the argument to send to the DWCurrentMacroArgument special variable for example:
"GlowEnabled"
A macro can run once the node with the Drag Entity is released in the 3D Preview control.
Enter the name of the macro to run on end, for example:
TurnOutlineGlowOff
A rule can be built for the On End Macro Name parameter by double clicking the On End Macro Name property from the Parameter Panel.
The value or result of a rule, placed in the Macro Argument property, is passed into the special variable DWCurrentMacroArgument (see Info: Special Variables).
Using the Macro Argument property allows the same macro to be used, but with differing outcomes depending on when it is run.
Enter the argument to send to the DWCurrentMacroArgument special variable for example:
"GlowDisabled"
With the model node selected and the Drag entity added to that node, the following will be displayed in the Parameter Panel:
Double click each parameter to build a rule.
Is required to result in True or False
Is required to result in the node address of the node that will act as the surface the item can be dragged onto.
Is required to result in the name of a macro.
Is required to result in a value to pass to the DWCurrentMacroArgument special variable.
Is required to result in the name of a macro.
Is required to result in a value to pass to the DWCurrentMacroArgument special variable.