Have a look at this post, there are examples of moving an actor with the mouse using a specific axis:
The script you’re showing seems to suffer from the issue I mentioned originally, you keep tracing against the component you’re already holding so the position keeps shifting.