Multi-Trace End returns 0,0,0 if no overlapped actors?

Hi! I was just wondering if there’s a way to get the end-trace result if no actors were overlapped during a multi-trace similar to how a regular trace works even if it doesn’t hit any actors.

In this example, it should return 0x, 0y, 100z but it always returns 0x, 0y, 0z if no actors were overlapped.

If no actors were traced (can check that with the bool), then there is nothing in the array and no modified end trace. So you could just as well use the 100 you entered in the MultiSphereTrace node.

Also… Arrays start at index 0. So , if you get the array element using its length as index it will always be out of bounds. As an array with 1 element will be length 1 but the element will be at index 0 (index 1 is out of bounds).

2 Likes

Thank you for the info about length starting at 1 instead of 0 I didn’t realize that!

As for the initial question, the reason why I was asking in the first place instead of just using the end result is because I have some portals set up, and I have line traces working with them. Multi-line traces were giving me issues though, because the end result never returned like with the regular tracing counterparts so I wasn’t sure if I was doing something wrong.

it’s a bit of a shame, but thinking about it, it makes sense since it’s outputting an empty array if no elements were hit. It’ll be easy enough to change the logic to accommodate anyways.

Thank you again for the info!

1 Like