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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Executing from Line Trace Node after no hit?

Hi I'm having some trouble with line trace. I need some nodes to execute whether a single line trace by channel hits something or not. It works fine if there is a hit. I also test to see if the break hit results time variable is less than 1. If it equals 1 then that's supposed to signal that there was no hit. However the problem is that once I'm not pointing my character at anything the nodes after the line trace just don't execute! Any help here would be much appreciated.

Product Version: Not Selected
more ▼

asked Apr 04 '15 at 12:45 AM in Blueprint Scripting

avatar image

0 1 4 5

avatar image JWizard Apr 04 '15 at 01:06 AM

Okay so I solved my issue by testing the return value of the line trace instead of the time variable of the BreakHitResult. But just to be clear is the out hit result updated if there is no hit? If this is the case it seems pointless to point out as a tip in the editor that time will equal 1 when there's no hit.

avatar image alperenakyuz Apr 04 '15 at 09:12 PM

It may retain the time value for the last hit even when there is no hit.

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

1 answer: sort voted first

You can use a looping Timeline (there's a loop checkbox in the Timeline editor, which you enter by double clicking your Timeline node) to update your trace perpetually until it hits what you want. You can use an IsValid Branch check on the resulting hit(s). Timelines can be started and stopped whenever you please, so you can easily activate/deactivate your traces as you need. You can combine this with Gates and/or DoOnce nodes in your trace execution to control exactly what happens on hit/no hit.

Timelines offer incredible control over many types of mechanics, considering their ability to be played/stopped/rewound, set to any length of time or loop, and output results of various graphs within them. They're essential for complex Blueprint operations

more ▼

answered Apr 04 '15 at 09:25 PM

avatar image

DG Gage
1.6k 62 31 129

(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