How to restrict object translation when using DragControls?

is it possible to translate only on axis x and z an object with dragcontrols ?

What about this behavior:

The idea is to save the current y position of the dragged object when dragging starts and then assign this value to the dragged object over and over again when the drag event fires.

1 Like

this is working but very slow when dragging object to top or bottom, but drag from left to right no problem …

You can use

If(object.position.y > 9 )
{object.position.y =9}

If(object.position.y < - 9 )
{object.position.y = -9}