In a 3D Sidescroller template: I have a simple raycast from my character(Start) to mouse cursor(End). And then straight down to land on the ground to set the endpoint for future teleport. I need the End to move only on the axis that my pawn is on - to the sides, up and down. Can I lock/constrain my linetrace to an XY axis so it won’t fly behind and in front of the pawn? Sort of like restraining planar movement on pawns but for a cursor/linetrace?
Here you can see the lines out of the XY plane. I want to lock them onto the XY axis of the pawn so he could teleport in front of him or up/down, not to the sides. :
Here is what I have so far:
Any feedback is greatly appreciated!