Raycast for isometric type game

Hi guys,
I’v been stuck with this problem for couple of days. I have a isometric type game where i want to raycast from the character by using its location and the direction its looking at. I have been gone through many tutorials and all but they all does the same thing which is doing raycasting for first person shooter.

i can share my simple code here below.

You can see that im trying to get the capsule component’s location and forward vector thinking that i can generate my raycast from there. But what happens is below.

No matter which location im at the raycast being generated from that same location and towards my camera component.
And i dont understand that raycast has a Z value since there nothing to change that. Below is the log that i created.

And so i tried making the Endtrace Z value 0 but that did not work. Meaning it only made LineTraceSingleByChannel function to return false.
Can anyone please tell me what im doing wrong here? Im new to unreal engine. Just started on this project and stuck. Any help would be nice.
Thanks in advance!

You have your end location set to your actor location + 300. What you want to do is set the start location of the trace to your actor location. Then for your end trace location you will take the actor forward vector and multiply it by the distance you want the trace to be.

well i tried that and that did the same. That is why i have taken the Capsule component’s location and forward vector for this. But it didn’t work as well. So right now what i have done is i put another camera to actor and position it as a first person camera and then casting a ray from that. It works for now. But im not sure that it is the correct way.