Spawned class blueprint has a already triggered OnComponentBeginOverlap

I have a custom made blueprint class, where there’s a door,frame and a Trigger box. It basically opens and closes when i press E while in the Triggerbox. LETS CALL THE BLUEPRINT AS ‘MYDOOR’ FOR CLARITY.

So i have a separate trigger box in my level. so what is supposed happen is that, when the player overlaps on the trigger box and presses E, MYDOOR actor is spawned at a specific place in the level. The spawning happens perfectly. But the newly spawned MYDOOR already has OnComponentBeginOverlap set. That means, even when im not inside the triggerbox of MYDOOR, i can still open and close the door from MYDOOR by pressing E.

Once i actually overlap on the MYDOOR’s trigger box, the blueprint starts working fine!

Any idea why the SPAWNED blueprint actor already has a triggered OnComponentBeginOverlap?

Hello sourabhhamigi,

I would suggest using a Print String or log message to check what object is triggering that OnComponentBeginOverlap. You could either print out the name or just store it in an array and check it. It may be overlapping with an object as soon as it spawns which causes this to occur.

Thats the thing, there is no object near the place where MYDOOR is spawned, except some walls around and a target actor placed there.

You’re going to have to post some code. I’d bet the problem is with your setup.

Things to do/check:

  1. Can the door mesh collide with the trigger box, or anything else in the trigger box? Essentially, can anything besides the player’s pawn collide with it?
  2. Cast the Hit Actor to your player, if it’s not the player, then don’t allow them to open it.
  3. Print String the ObjectName of the HitActor to see what is triggering it, it should help narrow down the problem.

If none of these leads to your solution you’ll need to provide more information and code/screenshots.

That’s the point of checking however. If you check to see what actors are overlapping the volume, it could be one of those walls or that target. It all depends on how your collision settings are set up.

Thanks guys, i figured it out. the actors in the blueprint itself were overlapping with the triggerbox, i simply had to turn off ‘allow overlap events’ for those actors.

Thanks guys, i figured it out. the actors in the blueprint itself were overlapping with the triggerbox, i simply had to turn off ‘allow overlap events’ for those actors.