OnComponentEndOverlap event doesn't fire
Hi, I'm sorry if this has been asked already, but after hours of looking through the forums I still couldn't find the answer, so I'm hoping someone could help me.
I'm trying to make a simple tower defence game to get to grips with blueprints, and I need to detect when an enemy enters the attack radius of a tower. I set up the tower blueprint with a sphere around it, which has OnComponentBeginOverlap and OnComponentEndOverlap events tied to it, but they aren't behaving the way I had hoped.
The enemy blueprint is basically just a mesh for now, and I have ensured that generate overlap events is checked on both the tower and the enemy, and the collision is set to OverlapAll.
The begin overlap event on the sphere around the tower, while it does fire on overlap, fires continuously whenever the enemy moves within the radius, rather than once as it enters, which could potentially be an issue.
The end overlap event, on the other hand, doesn't fire at all, even when the enemy actor leaves the sphere. The only thing that happens, is that the begin overlap stops firing repeatedly.
If I playtest the game, and fly in and out of the detection radius using the player controls however, the events fire perfectly, which leads me to believe there's some problem with the setup of the enemy. I also tried enabling physics on the enemy and letting it just fall through the towers detection radius and it worked fine. At the moment I have been using the simulate function and manually moving the enemy actor around.
The strange thing is, it was working fine earlier today, until i removed some unnecessary blueprint code from within the enemy blueprint, which seemed to break it. But even when I added it all back in, it still didn't resume working.
I'm completely stumped, and I even went as far as to recreate the tower and enemy functionality in a new project, just in case there was an obscure checkbox I had mistakenly tampered with, but to no avail.
Thanks in advance!
asked Jun 18 '14 at 03:00 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here