edit: you figured it out on your own
Assuming your function works as expected you can use the following vectors as the inputs: one that points to the mouse position from the player and one that points to the position that is at the same location as the mouse position, but with the z being swapped for the character position z.