Aim sword at mouse position, what options are there?

I am trying to move the sword (or the hand that holds it) with the mouse input.

The problem is that I can do this with aim offsets 2d, but I need a 3d movement.

For example, up/down (Y), left/right(X) would be controlled by input, while the depth (Z) would follow some function like the speed of input in X and Y.

A way that I had in mind was to aim the hand at a scene component that you could move with the mouse and the arm would follow.

Anything else?