How do I move actors on the plane like this?

Hi, I’m trying to move actors ox XY plane like in this THREE.JS example: DragControls - JSFiddle - Code Playground
(Rotate the view with the left mouse button and try to move the cube).
I created this blueprint:

but when I click on the actor the object slips under the mouse.
Thank you.