SphereTraceByChannel does not hit but MultiTraceByChannel does [SOLVED]

I’m having a problem that is driving me crazy.
I’m trying to use SphereTraceByChannel but it never hits the object I’m trying to hit. But if I change it to MultiSphereTraceByChannel it does work and returns the object in the output array.
I have the exact same inputs, so I don’t understand why one works and the other doesn’t.
I tried a simple LineTraceByChannel but it doesn’t work either.
I’m using a custom channel for the trace.

Here’s a pic.
With SphereTraceByChannel connected, the print string always show false and never shows a green tracer.

You are adding 150 in Z direction, so it’s tracing straight up. Is that intentional?

Yes.
It’s looking for a cable for the character to grab on. But it’s the same in both traces.

If multi works. It could be that it’s hitting the floor or something else before the cable?

Best thing to do would be to make the trace happen on tick with the visual debug on, eject from the actor. And look around for what it is hitting.

Since you are using channels the chances of it being the floor are rather slim.

The multi trace is hitting the cable for sure. I know this because I’m casting the “Hit Actor” to my cable actor in the “for each hit” and the cast is working.
Actually all logic is working fine, I could leave it this way. I just want to replace the mutli trace because I imagine it is more processing intensive then a simple SphereTrace.
I’m going to try a few more things.
I have SphereTrace working in other places…

Ok, I managed to get it to work.
I changed the tracer collision in the cable from “overlap” to “Block”. And now it is getting the hits and working properly.
I don’t know why the behaviour differs between multitrace and trace…

It’s not much different. Except single stops working after the first thing it hits.

Re your last post.
That’s seems like it’s actually why.

A blocking hit stops the single trace from tracing all the way to the end.

An overlap isn’t a blocking hit, so it may not register the same.

Multi works off the overlap because it can intersect/hit many things which does include stuff set to overlap.

If at any time you want to read the actual functions you can build a c++ project, toss a multi trace node in a BP and double click it to have visual studio pull up the kismet library code.
For stuff like this it may give you a clearer overall picture…

1 Like