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.
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.
It may retain the time value for the last hit even when there is no hit.
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