Sweep results for Overlap collision not populated

I’m having a lot of trouble getting anything from sweep results for a collision overlap. The event happens but the results are all zeroed out. Does something in particular have to be done to force the sweep to happen?

Do both colliders have their “GenerateOverlapEvents” checkbox on “true”?

Thinking about it, you have 2 volumes overlapping one another. Wouldn’t a result of 2 overlaps be another volume? This is not a blocking collision with an impact point.

Also, if you branch FromSweep, you’ll most likely see this is not even a sweep.

to clarify: teleport a sphere inside of another sphere - sure they’re overlapping - now try imagining the location of the overlap…

I’ve scoured the questions db with some results, but they didn’t help and they were all for old version of unreal.

they do, yes.

technically speaking, the colliders are both the same regardless of type. Whether two blocking colliders hit each or two overlaps happen, it’s the same thing in respect to what you’re saying. They would both have a point of intersection. According to the documentation, this is approximated though because there is not an actual blocking property.

Also - there’s a flag in the collision properties called “Simulation Generates Hit Events” for this exact thing… at least as far as I understand it.

This is a sweep:

The result here is a location where the objects would not overlap:

Image from Gyazo

That’s what I’ve always thought sweep was. But someone please do correct me if I’m wrong!

So you can do this:

Image from Gyazo

My problem is not that my overlap is not successful. The collision happens without fail. It’s resulting data that is zeros.

The way I understand what a sweep is, is that if you move an actor from point a to point b over a frame, the sweep will cause the overlap events in between to trigger.

In my case, I’m not getting that. The only thing that seems to return anything at all is the Hit Actor… BUT - it returns itself as a result instead of the Actor that hit it. “Other Actor” from the the actual component work, but not the Hit Actor from the Hit Results.

What type of movement (and settings) are you using in your moving actor?

Is it SetActorLocation(); bSweep = true; bTeleport = false?

In short - what leads to the overlap in the first place?

The sweep is executed on the moving actor (not really accurate but serves the point) as part of its movement so you should check whether the SetActorLocation() return hit (or whatever movement you are using) and the OnComponentBeginOverlap return hit match or not. I would suggest that your “hitting” actor notifies your “being hit” actor about the point of impact if it returns the correct information.

Use the FromSweep branch on the Overlap node and you’ll see that your movement is not a sweep.

so this clearly seems like a bug. but i found a pretty gross workaround. Im doing a sphere trace for object type around the location of the actor in question. i don’t like this at all because it requires raycasting to solve an issue that should work out of the box.

I really think this should be looked into, or at least clearly explained in documentation why the original way would not work.

that was effectively what i was doing. I have this setup just to debug the location of the hit because i was under the impression that the collisions were happening at the wrong spot.

The object im moving in the images, is just a debug object. It doesn’t need to sweep anything. The opposite actually - i don’t want it to report any collisions. I was just using it to visualize the impact point.

yeah, you’re right. it’s spitting out a false every time. but i don’t know how to force the sweep to happen. I’ve turned on the sweep flag anywhere i have set location.