Overlap not working when spawning

Suppose I have two objects, overlapping. The overlap is working fine. I save them both with a SaveGame object, preserving their class and transform. I press stop, I press play, I load my SaveGame, and I use Spawn Actor from Class to put the two saved objects in my world. They reload perfectly, BUT they do not overlap anymore. Even worse, their overlap function doesn’t work at all anymore, not even when I put one of them somewhere else and make them overlap again, or even with a third object.

I have already tried about everything I could find on this matter:

  • put a delay after the Spawn function and actions after that
  • use a “Set timer by event” in the Event Beginplay of the spawned object
  • use the function “Set collission enabled”
  • move the spawned actors to a random location, and moving them back to their correct place, so that they moved apart and generated a new overlap

When I print the “Generate overlap events” of the mesh, it tells me that is is set to “true” for both objects.

By the way, the overlap is checked every tick (which is needed for this project).

I think that the biggest problem is that no overlap events get detected at all. I see tips and videos where they move one actor away and back to the overlap, and it works. That is not the case for me.

Try checking “Generate Overlap Events During Level Streaming”

1 Like

Forgot to mention this in the list of things I tried, but I tried with no result. The box is checked on the top level (Self).

However, I just noticed a significant difference between a loaded object and a newly created one. The hierarchy of the object is:
XYZ (Self)

  • DefaultSceneRoot
    • Mesh
    • Cube

On the Mesh level, I see that a loaded object has Collission Presets set to “NoCollission” (it does have Generate Overlap Events checked), whereas a newly created object has “Collission Enabled (Query and Physics”. Could this be the cause of the problem?

UPDATE: nope,that’s not it … I just did “Set Collision Enabled” on the mesh in Event BeginPlay, the Collision settings are now the same on both the loaded and the newly created version, but it still doesn’t work.

Did you achieve to solve it?

Yes, but I can’t remember how, and even worse: I accidentally deleted the project. After I had solved this, another problem turned up however: performance. The project itself was some kind of building project, in which you could place a lot of objects. Once more than 100 objects were placed, performance was awful. I have restarted the project with a totally different approach.