Skip to content

Dragger

Supported Class Other

A helper object used to create tools that can drag parts.

Description

The Dragger object is a helper object used to create tools that can drag parts. It is expected (but not required) to be used with Mouse events.

Primarily used with the RbxStamper library.

Inheritance

Object → Instance → Dragger

Nova inheritance: Instance → Dragger

Methods

AxisRotate Supported Function Rotates the currently dragged part(s) by 90 degrees on the given axis.
Dragger:AxisRotate(Axis axis = X)

Rotates the currently dragged part(s) by 90 degrees on the given axis.

Rotates the currently dragged part(s) by 90 degrees around the specified world axis. This method can only be called while a drag is actively in progress (after Dragger.MouseDown() has been called and Dragger.MouseMove() has initiated movement). The axis parameter defaults to Axis.X.

For single-part drags the rotation is performed about the snap face axis. For multi-part drags the rotation is applied around the computed center of the part group using a collision-aware routine that prevents overlap with surrounding geometry.

Roblox reference signature
Dragger:AxisRotate(axis: Axis = X): null

Roblox documentation

MouseDown Supported Function Initializes a dragging action, specifying which parts to use when dragging.
Dragger:MouseDown(Instance mousePart, Vector3 pointOnMousePart, Objects parts)

Initializes a dragging action, specifying which parts to use when dragging.

Initializes a dragging action by registering the parts to drag and the point on the mouse part where the interaction began. This method does not immediately begin moving parts; actual movement starts on a subsequent Dragger.MouseMove() call once the mouse has moved beyond a break-free threshold (half the current grid snap distance).

mousePart must be a BasePart that is both a member of parts and a descendant of Workspace. Calling this method while a drag is already active (before Dragger.MouseUp()) throws an error. While a drag is pending, camera mouse-pan is disabled so that mouse movement applies to the drag instead of the viewport.

Roblox reference signature
Dragger:MouseDown(mousePart: Instance, pointOnMousePart: Vector3, parts: Instances): null

Roblox documentation

MouseMove Supported Function Tries to move the currently dragged part to the point where MouseRay hits another part.
Dragger:MouseMove(Ray mouseRay)

Tries to move the currently dragged part to the point where MouseRay hits another part.

Attempts to move the currently dragged parts to the location indicated by mouseRay. Must be called after Dragger.MouseDown().

On the first call that detects sufficient mouse movement (exceeding half the grid snap distance), the method transitions into active dragging: it un-joins the dragged parts from surrounding geometry, aligns them to the grid, and begins tracking movement. On each subsequent call, the ray is cast against other parts in the Workspace (or against the world ground plane at Y = 0 if nothing is hit), and the dragged parts are moved toward that snap point using a collision-aware algorithm that prevents them from overlapping existing geometry. Single-part drags use surface snapping; multi-part drags use grid-aligned displacement with Y-drop collision avoidance.

Roblox reference signature
Dragger:MouseMove(mouseRay: Ray): null

Roblox documentation

MouseUp Supported Function Stops the current dragging action (made by Dragger.MouseDown()).
Dragger:MouseUp()

Stops the current dragging action (made by Dragger.MouseDown()).

Stops the current dragging action initiated by Dragger.MouseDown(). If parts were actively being dragged, this method re-joins them to adjacent geometry and finalizes their position. If MouseDown was called but the mouse never moved far enough to begin actual dragging, the state is simply reset. In both cases camera mouse-pan is re-enabled.

Calling this method without a prior Dragger.MouseDown() throws an error.

Roblox reference signature
Dragger:MouseUp(): null

Roblox documentation

Inherited members

Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.

Roblox reference: Dragger

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.