How do I control a pawn while controlling a character?

Hello, I want to make a side scroller game where I can do some actions based on the 2d position of the mouse (like teleport on mouse position, shoot a fireball on mouse position etc.). Basically I wanted to get the mouse X and Z (on a fixed Y) axis in world space. My idea was creating a pawn that can move freely by mouse. To prevent it from changing in Y axis I created an invisible wall which only blocks pawns. I followed some tutorials for mouse pawn movement with no success. I used the DefaultPawn preset while creating a pawn. Any help will be appreciated, thanks.

Edit, I managed to add the pawn to move only in X and Z axis following this tutorial: https://www.youtube.com/watch?v=c30nwXJz9GY and using controls as MouseX and MouseY, but I want to use the CameraBoom I have on my character, not the pawn’s. So my original question still remains the same. However, even if I do that, the pawn will follow mouse movement not position, is there any other way I can do it?