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"

Problem with Lengthening a vector


I'm having some problems with trying to lengthening a vector that i'm using for a Line Trace. The trace starts at my character with a slight offset, and ends where my mouse cursor is - using a 'get hit result under cursor':

alt text

And it works great:

alt text

But now i want the Line Trace to continue further than the Mouse cursors position, so from looking at tutorials and other peoples blueprints i figured i would just have to multiply the vector - like this:

alt text

But that doesnt work at all! It seems like all the Line Traces are now going off somewhere that is not towards the mouse cursor at all!

alt text

So can anyone help me? I just want the Line Trace to go from my character, towards the mouse cursor and continue beyond it.

Product Version: UE 4.8
more ▼

asked Jul 04 '15 at 02:55 PM in Blueprint Scripting

avatar image

12 3 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

try subtracting the start vector before multiplying.

right now you are adjusting the end point, but you want to adjust the whole vector, which would be the end vector minus the start vector.

your end vector is not relative to your start vector, its relative to the origin, so multiplying it by a constant would give you a lengthened vector from the origin, when you want a lengthened vector from the start location, so make the vector relative to the start location by subtracting start from end before multiplying.

more ▼

answered Jul 04 '15 at 03:17 PM

avatar image

9.6k 320 205 449

avatar image Bl00dy_Wanker Jul 04 '15 at 03:24 PM

That fixed it!

Thank you!!!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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