Dont fire ActorEndOverlap event if actor stop move
The context : I try to manage the distance of displaying some informations. I have a map with some actors and widget in this.In my pawn, i have a collision sphere, represent the max distance to display widget. On my actor in my map, i have a ActorBeginOverlap fired when the collision sphere of the pawn overlap this actor. This part work fine.
The Problem : The problem is, when the pawn stop move (for stay near the actor) the event ActorEndOverlapis fired. So, the information (widget) disappears and when i move again, the BeginOverlap is fired again. What i want is, the widget dont disappers when the pawn dont move, and disappers only if collision sphere really EndOverlap.
I dont want perform some verification in tick (of actor, or pawn) for check distance (cause i can have many actor at same time).
What is the way to achieve that in easiest way with less ressources ?
Thank you very much.
asked Feb 18 '19 at 08:05 PM in Blueprint Scripting
Not entirely sure I get it, but I think the problem may be collision detection. To be entirely sure you want to set your sphere as being detected as a unique entity, for example a "vehicle" if you're not using that collision channel. The best way is to create a new collision channel by going into project settings and adding a new collision type.
This is because the issue may be that several types of collisions are being detected. I had the same problem with my characters since they their mesh (pawn), their armor (world dynamic) etc firing the events. Once I set up a custom collision for my sphere and detected only that, everything worked fine.
This is what I use for any kind of end or begin overlap with an interactable sphere that activates text widgets, glow, enemy AI etc:
Follow this question
Once you sign in you will be able to subscribe for any updates here