Download

ReceiveActorBeginOverlap called twice

I have a ReceiveActorBeginOverlap method to handle portal teleporting. If I set the OtherActor’s rotation and location, my ReceiveActorBeginOverlap method gets called twice in a row (with exactly the same this pointer and OtherActor pointer). However, if I only change the OtherActor’s rotation and don’t move him, the method correctly gets called only once. And yes, I’m moving the OtherActor sufficiently far away that he isn’t legitimately triggering another overlap. This is totally baffling. I’ve been on this for days now and can’t figure it out.

I know that the physics system has substepping, and last time I read about it all of the collisions and events were stored in a queue and were processed on the next tick. That may be causing some of what you are seeing. It would be interesting to know if you are getting and EndOverlap in between the two BeginOverlaps, in which case it’s probably the substepping.

Here’s a quote:

I think it’s in the documentation somewhere, as well as here : Physics Sub-Stepping - Announcements and Releases - Unreal Engine Forums