[SOLVED] Line Trace points somewhere else

Hi!

I am using LineTrace for the first time. My goal is to use it in a VR gaze-based teleport system. I followed some tutorial I found online and after some issues with the results decided to go to the basics by applying it to the FP-Character of the FPTemplate. I did what the turorial said as you can see in the picture here:

But when I hit on play and click the fire button the trace line is drawn pointing to the sky and backwards when I am aiming at at box. I think it has to do with the Get World Position node but I cant figure out how to solve it.
I know this is pretty basic stuff but I cant find the solution online.

Thanks!

Hi

I think you have to use multiply on the forward vector instead of your add 1000. And also change the vector multiply vector to vector add vector.

Hi Ikav!

I am using vector + float wich multplies the value and then it is linked to a vector + vector node

You have trace done not correct. Here how to (you need to change Event Tick with Fire if you need):

https://docs.unrealengine.com/latest/images/Gameplay/HowTo/UseRaycasts/Blueprints/GHT2B_6.jpg

Whole good tutorial is here https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/

Thanks Vaheva! I´ll try that!

Still not working

I pressed the button when I was looking behind

Code is good. Do you have changed settings in fps template?

None :frowning: Its weird

Show your current code.

you have + and multiply in wrong places - change it. fps camera/GetWorldLocation must be vector + vector, GetForwardVector must be vector * float (or integer).

This can be confusing, good it works. Select answer to close thread - title not closing it.

Amazing! That was it! Thanks! So silly not to see that.