Drag Objects in Your Scene
Let users drag and move 3D objects with mouse, touch, or VR controllers using the DragControls component. Works in Unity and Blender.
Make objects draggable in 2D screen space or 3D world space with mouse, touch, and VR support.
:::tip Works with Unity and Blender The DragControls component is available for both Unity and Blender integrations. :::
What You Can Do
Drag with Mouse/Touch - Click and drag objects on desktop and mobile
VR/AR Support - Grab and move objects with controllers or hands
Multiple Drag Modes - Floor plane, screen space, surface snapping, and more
Grid Snapping - Snap objects to a grid while dragging
Multiplayer - Works with networking for collaborative experiences
Physics Integration - Automatically handles rigidbodies during drag
Perfect for:
Interactive product configurators
Furniture placement tools
Collaborative design spaces
VR/AR object manipulation
Puzzle and building games
Quick Start
Basic Setup
In Unity or Blender:
Add the
DragControlscomponent to any object with a meshExport and open in browser
Click and drag the object - it moves!
That's it! The object is now draggable.
With Networking
Share dragged objects with other users:
Add
SyncedRoomcomponent to your sceneAdd
SyncedTransformto draggable objectsUsers automatically see each other moving objects
Settings
Drag Mode
How the object moves: Floor plane, attached to cursor, or surface snapping
Snap Grid Resolution
Grid size for snapping (0 = no snapping)
Keep Rotation
Maintain object's original rotation while dragging
XR Drag Mode
Separate drag mode for VR/AR controllers
XR Keep Rotation
Maintain rotation while dragging in VR/AR
XR Distance Drag Factor
How quickly objects move closer/farther in VR
Show Gizmo
Display visual line from object to surface below
Drag Modes
XZ Plane (Floor)
Objects stay on the same horizontal plane as they started. Perfect for objects on floors or tables.
Attached
Objects follow the pointer/controller directly. In 2D, they move along the screen plane. In VR, they follow your hand.
Hit Normal
Objects drag along the surface normal where you grabbed them. Good for objects on walls or slopes.
Dynamic View Angle
Automatically switches between floor plane (looking down) and screen plane (looking straight) based on camera angle.
Snap To Surfaces
Objects stick to surfaces as you drag them. Great for placing objects on walls, ceilings, or furniture.
None
Disables dragging completely.
Examples
Furniture Placement
Let users arrange furniture in a room:
Add
DragControlsto furniture objectsSet Drag Mode to
XZ Plane(keeps furniture on floor)Set Snap Grid Resolution to
0.1for clean placementUsers can drag furniture around the room
Collaborative Workspace
Multiple users placing and moving objects together:
Add
SyncedRoomcomponentAdd
DragControlsandSyncedTransformto all draggable objectsSet Drag Mode to
Dynamic View Anglefor natural movementUsers see each other moving objects in real-time
VR Object Manipulation
Natural VR grabbing and placement:
Add
DragControlsto objectsSet XR Drag Mode to
Attachedfor natural hand movementDisable XR Keep Rotation to allow rotating objects while dragging
Use Snap To Surfaces for placing objects on walls/tables
Product Configurator
Let users position and rotate products:
Add
DragControlsto the productSet Drag Mode to
Attachedfor screen-following movementEnable Keep Rotation to prevent accidental rotation
Add UI controls to call rotation methods from code
Scripting
Check if Objects Are Being Dragged
Detect when any object is being dragged:
Get Currently Dragged Objects
Access all objects currently being dragged:
Keep Objects Within Bounds
Constrain dragged objects to stay within a defined area:
How to use:
Create an empty GameObject to define the bounds area
Add this component to it
Scale the GameObject to set the bounds size
The component will keep all dragged objects within this box
A pink wireframe box visualizes the bounds
Change Drag Target Dynamically
Useful for duplicating or switching objects mid-drag:
Respond to Drag Events
Detect when an object with DragControls starts or stops being dragged:
Advanced Features
Grid Snapping
Snap dragged objects to a 3D grid:
Set Snap Grid Resolution to desired grid size (e.g.,
0.25for quarter-meter grid)Objects snap to grid points while dragging
Perfect for building tools and placement systems
Multiplayer Ownership
DragControls automatically integrates with SyncedTransform:
Requests ownership when dragging starts
Enables "fast mode" for responsive dragging
Releases ownership when dragging ends
Other users see smooth synchronized movement
Physics Integration
When dragging objects with Rigidbody components:
Automatically becomes kinematic during drag (no physics simulation)
Wakes up rigidbodies and resets velocities
Returns to physics simulation when released
Applies velocity on release for throwing mechanics
VR Distance Control
In VR/AR, pulling controllers toward/away from your body changes object distance:
XR Distance Drag Factor controls sensitivity
Higher values = more responsive distance changes
Set to
0to disable distance adjustmentWorks naturally with hand/controller movement
Common Questions
How do I make only specific objects draggable? Add DragControls only to objects you want to be draggable. Objects without the component can't be dragged.
Can I drag objects in VR without seeing controllers? Yes! DragControls works with XR hand tracking and controller-free input. Just enable XR support.
Why does my object jump when I start dragging? This can happen if the drag plane is incorrectly positioned. Try changing the Drag Mode or ensure the object has proper colliders.
How do I prevent objects from dragging through walls? Use Snap To Surfaces drag mode and ensure your walls have colliders. The object will stick to surfaces.
Can I drag multiple objects at once? Each DragControls handles one object, but you can have multiple dragging simultaneously (useful for multi-touch or VR with both hands).
How do I disable dragging temporarily?
Set Drag Mode to None or disable the DragControls component.
Does it work with networking in production?
Yes! DragControls is designed for multiplayer. Combine with SyncedRoom and SyncedTransform for collaborative experiences.
Debugging
Enable debug mode by adding ?debugdrag to your URL:
This shows:
Visual helpers for drag planes and normals
Attachment points and hit positions
Movement distances and device info
Bounding box snap points
More Information
Live Example:
Collaborative Sandbox - Multi-user dragging and placement
API Documentation:
DragControls API - Complete technical reference
Related Components:
SyncedTransform - Network synchronization for dragged objects
Duplicatable - Duplicate objects while dragging
Deletable - Delete dragged objects
Last updated