Multi Capsule/Sphere Trace return always 1 hit

Hello everybody,

I’m doing some tests with the UE4 features. Currently, I’m trying the Multi Capsule/Sphere Trace to check how it works.
I’ve created a level with several thin walls close to each other and launched a Multi Sphere Trace through these walls to see what are the hits returned by this method. But when I print the length of the hits array, its value is always 1, even when the trace is actually going through several walls.

Did other people notice this ? Is this a bug or am I misunderstanding the purpose of the multi trace method ?

Thanks

The traces return an array right? Are you dong a ForEachLoop on the array to get and print each member?

The traces return a array, indeed. I’m not doing a ForEachLoop though, I’m just printing the length of the array. And this length is always 1.

Ok, you may want to look at the collision channels for your walls. Assuming you want the trace to penetrate the wall, it may not be letting it through. If you set the trace’s debug line on it will show you a small red box that appears on the first thing it touches and probably not the others.

Also, I think there is a box somewhere that determines whether an object can be penetrated or not((or maybe it was if it can penetrate).

Ok thank you for your help. I’ll try some new tests with these informations as soon as I can. Thank you again !

Hi Yoyogi,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

I ran into the same problem today with the Multi Sphere Trace by Channel node, and I resolved it by changing the collision response for my trace channel to to “overlap” instead of “block”. Hope that helps anyone who’s stuck.

Set the responce channel of the actor you want to find to OVERLAP, not to BLOCK.
Explanation: If you cast a multy trace (sphere or box) to a specific channel, given a START and an END position (those two position cannot be equal, remember), the trace will stop at the first actor that BLOCK the trace (such actor have the specified channel response set to BLOCK), without completing the cast to the END location. So , by casting a trace box from A to B , if the trace find a BLOCK actor between the two point , this new point C will be the end of the cast, for a final cast from A to C. For using the multy trace cast to return all the actor in the specified area, the actors must set the channel responce to OVERLAP, in this way the trace will not stop to the first actor it finds.
I had the same problem but Nylira suggested the overlap / block solution. The length of the returned array was 1 in my situation too. I guess that if the trace find some overlapping actors before finding a blocking actor , the array length will be higher than 1.

I just had to say thank you, Endorall! That was an extremely helpful solution. :slight_smile:

I’m here with Adam, Thanks Endorall!