Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

alt text

Product Version: UE 4.20
screenshot-1.png (95.3 kB)
more ▼

asked Aug 07 '18 at 09:09 PM in Using UE4

avatar image

75 9 12 16

avatar image Floggins Aug 07 '18 at 09:09 PM

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

avatar image dZh0 Aug 07 '18 at 09:17 PM

Do both colliders have their "GenerateOverlapEvents" checkbox on "true"?

avatar image Floggins Aug 08 '18 at 01:09 AM

they do, yes.

avatar image Everynone Aug 07 '18 at 09:31 PM

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...

avatar image Floggins Aug 08 '18 at 01:14 AM

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 actually being a 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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

alt text

screenshot-5.png (160.9 kB)
more ▼

answered Aug 08 '18 at 02:11 PM

avatar image

75 9 12 16

avatar image Everynone Aug 08 '18 at 02:15 PM

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

avatar image Floggins Aug 08 '18 at 02:18 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This is a sweep:

alt text

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:

alt text

Image from Gyazo

sweep.png (171.3 kB)
cap2.png (177.8 kB)
more ▼

answered Aug 08 '18 at 11:47 AM

avatar image

13.7k 74 25 57

avatar image Floggins Aug 08 '18 at 01:47 PM

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.

avatar image dZh0 Aug 08 '18 at 02:09 PM

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.

avatar image Floggins Aug 08 '18 at 02:15 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question