Choose your operating system:
Windows
macOS
Linux
MultiLineTraceByChannel will perform a collision trace along a given line and return all hits encountered (up to and including) the first blocking hit, returning only objects that respond to the specified Trace Channel. What this means (practically), is that if their are a number of Actors or Components with collision that Overlap the specified Trace Channel between the start and the end of the trace, you will recieve them all. But, if the first hit Blocks the specified Trace Channel, you will only recieve that one item. If you want to recieve all items regardless of overlap, or blocking a trace channel, you should use a MultiLineTraceByObject node. Below, you will find steps for setting up a MultiLineTraceByChannel Blueprint.
Steps
Follow the steps used for the LineTraceByChannel example to set up a trace.
Replace the LineTraceByChannel node with the MultiLineTraceByChannel node.
Drag off the Out Hits pin and add a ForEachLoop node.
Since multiple Actors are hit, for each of them, we want to do something (in this example, print the Actors to the screen).
Drag off the Array Element and add a Break Hit Result node. Then, drag off the Hit Actor, add a Get Display Name (Object) node and connect to a Print String node.
Click image for a full view.
This will now print to the string each of the Actors hit by the array.
Result
Here, we have a Glass Window in front of a Physics Actor.
The Glass Window is a Destructible Mesh, and we have set its Trace Response to Visibility in its collision settings, which is set to Overlap; while the Physics Actor (Cube) has its Visibility setting to Block. You could use this for situations where you may want to shoot through an object (destroying it) while also hitting an enemy.