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!