VR - How to grab object and move it only in Z axis

Thanks Jared,
In theory I think that is the logic I am trying to achieve, but I should be more specific and say I have no idea how to do it in blueprints. I am more familiar with javascript in Unity, and this blueprint thing is still really hard to navigate for me.