DragControls - dragging objects according to the GridHelper grid

Hello,

I would like to know how to enable dragging of objects (with DragControls) according to the grid created by GridHelper (snapping to the grid). Is there a way to achieve this with DragControls and GridHelper or something else must be used?

Many thanks!
Mirko

There is no automatism for this use case. You have to enhance DragControls in order to achieve the intended snap effect. The following example might be useful in this context since it implements similar logic for a voxel editor. You can try to adapt the logic from the onDocumentMouseMove() event listener to DragControls.

https://threejs.org/examples/webgl_interactive_voxelpainter