Download

Why Multi-Line Trace returns only one value?

Hey Guys. I’ve tried a lot of things but I can’t figure out a way to get multiple values from a multiline trace like the one shown below(For example only) where I’m trying to cast a multi-line trace for all the cubes from the sphere.

DemoForTrace.PNG

but whenever I tried printing out the array index it always prints the 3 zeroes and 3 1’s for array length

Array.PNG

But it shows different locations when the corresponding hit location is printed out.

How can I make the array of the trace hit to show a length of 2 or print an index like 0, 1 and 2 so that I can check for the number of hits.

Please tell me if i’m doing anything wrong here.

Thanks

I hope I’m reading this right, you cast multi line trace 3 times, while the cube get hit by different trace call, and expect to get the hit result aggregated?

Ya, that’s exactly what I’m asking.

I got it to print 0, 1 and 2 for the index. I created an array and stored all the vector locations for all the hits and it worked.

Thanks