Hello, I’m having an issue figuring out how to generate overlap events when I spawn actors on other actors.
In my game, I’m spawning spells in the world. I keep a running list of the objects within the collision area of spells by adding them when I receive a NotifyActorBeginOverlap() event and remove them I receive a NotifiyActorEndOverlap() event. For the most part, this has worked pretty well and given me what I want.
My problem is that I have a category of spells that I’m placing as an area directly beneath the player’s feet. Whenever anyone touches the spell’s area, I need to know. The problem is that I have no idea who’s in the collision area when the spell is spawned. If the player (or a creature) leaves the area and comes back in, I’ll receive a begin overlap event as normal, but I need to know without having to leave the collision area and come back in. Also, as one would expect, setting the collision to block instead of overlap gives a notification, but stops the player from moving at all, which is certainly not desirable (players and creatures should be able to run over it).
For reference, I am using UE 4.9 and I am looking for an answer in C++, as I do not use Blueprints. Thank you for your time.