Multi Line Trace Confusion

I just want to capture all the hits along the line trace, but why is it so complicated?I don’t understand it at all.

I’ve seen descriptions stating that Multi Line Trace registers only one hit even though the length has already been set.This is completely incomprehensible.Even though I specifically chose Multi Line Trace instead of Line Trace, why does it stop after only one hit?

Further investigation revealed that in order to obtain multiple Hit Result results, the trace channel needs to be set to Overlap.line tracing passing through objects.However, the Hit Result does not contain any Overlap objects.

So, what needs to be done to make this usable?It’s ridiculous to even have to set overlaps to detect multiple hits in the first place.

‘Multi Line Trace By Channel’ can be counter intuitive, you need to create and use a channel other than visibility, which is set to a default ‘Overlap’ response and use the node’s ‘Return Value’ false for anything that isn’t a ‘Hit’. Pardon the abrupt video editing.

Key elements:

MultiTrace stops at first Blocked hit. Where Blocked means “this collision behaves like an inpenetrable wall”. If your collision response on channel you tracing over is Overlap - those objects will be gathered and will not stop the trace. Obviously, collisions with response Ignore will be ignored.
So in the end it’s a question of:

  • Setting up channel and per-channel responses on collisions correctly;
  • Making sure collision volumes exists (you can have collision-less meshes);
  • Making sure that your trace line is not missplaced and really goes through those volumes.

Worth noting that result array of hits is ordered in a way:
[Closest Overlapping Obj]->[Farthest Overlapping Obj]->[Blocking Obj]

1 Like

I’m puzzled why the trace stops at Blocked. If the initial hit is needed, why not just use normal line tracing?

Setting the trace channel to Overlap will eliminate synergy with other line traces.Because standard line tracing cannot detect overlap.

As suggested by Infant Zero, a dedicated trace channel for overlaps is required, but this doubles the number of channels that need to be configured.This can lead to bugs and configuration errors.

Overall, it’s really unkind.The specifications and limited options are not what i would expect from the function name.At the very least, options should be provided.