OnComponentEventOverLap Not Firing Randomly

Hi Everyone,
I have set up a endless runner type of game, and I have set up a End trigger and it will run a blueprint to make new floortile ahead. After adding more function and content in my game, I found out the floortile will randomly not spawn,I made sure all my box collision (EndTrigger) is placed properly and they have been hit. and I also tested in the game with the box collision not hidden in game and paused the game when the Floortiles are not spawning to check, I couldn’t find the reason.
Sometimes they works just fine, sometime they don’t. I do have other object like coins and blocker, are they causing the problem? Is it a bug or is it something I might be not aware of?

FIXED: i made a extremely stupid mistake, I was making a new type of floortile and added a new element in my floortile array and I didn’t finish the work during that time and left a NONE in my array, and that’s what is causing the missing floortile!

Below are the screen shot of the endlesstrigger (the tall one between tiles). It’s a paused game screenshot after the floor stopped spawning and my character fly out :(. Sometime i can keep running for 5 min nothing happened, and sometimes it happens in the first few tiles.

Thanks!

Hi there, could you please provide us with some screenshots? Ingame with visible colliders? Would be the first step to make any help possible at all if someone can understand what you do with your triggers :slight_smile:

I just updated my post the pictures! Thanks for the suggestion!

Great, so here we go :slight_smile:

One problem that I have experienced with BeginOverlap is that it does not fire if the collision happens already when spawning in the actor or the colliding object. I guess you spawn a bunch of tiles ahead of the player, so I am not sure if there will be any case where you accidently/randomly spawn an collider on your actor. But just be aware of this.

Just a question about a simpler painless approach: Why do you bother with Colliders at all to spawn your tiles?
You know the Location of the player and you know the Location of your last tile. If the difference between both locations is less than a certain limit, you can spawn the next tile :slight_smile:

hope that helps :slight_smile: Marooney

First of all thank you so much for your answer and your time!!
I actually just found out i made a extremely stupid mistake, I was making a new type of floortile and added a new element in my floortile array and I didn’t finish the work during that time and left a NONE in my array, and that’s what is causing the missing floortile!
About the idea of the spawning floortile by judging the distance (or floortile number between them), that’s such an amazing idea. Sorry I am a beginner and the main skeleton of game is from the Endless Runner Epic tutorial and using Endtrigger is what they did.
Anyway thank you so much for your help!!!

I’m happy to help :slight_smile:
Please check the answer as solved (on the left side below the arrows) to close this question for the answerhub-system and for people looking for unanswered questions :slight_smile: thx :slight_smile: