x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[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: alt text

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!

Product Version: UE 4.18
Tags:
linetrace-bp.jpg (85.5 kB)
more ▼

asked Dec 21 '17 at 07:59 PM in Blueprint Scripting

avatar image

RealRenders
10 1 2 7

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

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.

more ▼

answered Dec 21 '17 at 08:14 PM

avatar image

lkav
361 3 3 7

(comments are locked)
10|2000 characters needed characters left

Hi Ikav!

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

more ▼

answered Dec 21 '17 at 08:30 PM

avatar image

RealRenders
10 1 2 7

(comments are locked)
10|2000 characters needed characters left

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

alt text

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

more ▼

answered Dec 21 '17 at 08:29 PM

avatar image

Vaheva
1.2k 22 24 42

avatar image RealRenders Dec 21 '17 at 08:36 PM

Thanks Vaheva! I´ll try that!

avatar image RealRenders Dec 21 '17 at 08:38 PM

Still not working

alt text

I pressed the button when I was looking behind

linetrace-back.jpg (75.6 kB)
avatar image Vaheva Dec 21 '17 at 08:41 PM

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

avatar image RealRenders Dec 21 '17 at 09:02 PM

None :( Its weird

avatar image Vaheva Dec 21 '17 at 09:03 PM

Show your current code.

avatar image RealRenders Dec 21 '17 at 09:11 PM

alt text

code.jpg (97.3 kB)
avatar image Vaheva Dec 21 '17 at 09:15 PM

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

(comments are locked)
10|2000 characters needed characters left

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

more ▼

answered Dec 21 '17 at 09:44 PM

avatar image

RealRenders
10 1 2 7

avatar image Vaheva Dec 21 '17 at 09:50 PM

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question