Question about aim offset

Hello,

I was following this video about moving the arm with the mouse and I saw the he uses an aim offset that he triggers with shift in the animgraph:

This works well for me, the only problem is that he cannot control the depth at which the arm moves (he can only control the X and Y, not Z) since the aim offset is 2D.

I wanted to be able to control the Z (depth) according to the speed at which we move the mouse.

I know I could make another offset with a retracted arm and then move to the extended arm offset using conditions, but that would only allow me to switch between two fixed depths.

I want a more progresive method that allows me to define the depth at which the arm goes according to the mouse input. If it is a large input, the mouse goes deep (large Z), if it a small input it does not go as deep (small Z).

Any idea?