Make one component not overlapping on ActorBeginOverlap

I have a large trigger sphere around the enemies, which is used for checking if player is reachable for the enemy, but also I check if enemy is directly overlapping the player. I put a sphere into a third level of components hierarchy but it continues to raise the ActorBeginOverlap event with the player. How to change this behaviour, but without fully disabling the sphere’s collision, since I want to separately check if it overlaps the player, but with different actions that the general overlap?
EDIT: I cannot check if only one enemy’s component overlaps the player, because I have many types of enemies with various components, and I want them all to raise the event, EXCEPT the reachability zone.

Your player character can ignore specific actors with:

APawn::MoveIgnoreActorAdd | Unreal Engine 5.5 Documentation | Epic Developer Community | Epic Developer Community

Also collision channels might be an option.

Hello @Shmoopy1701! No, the player must not ignore enemy, and even must not ignore trigger sphere, but the collision with trigger sphere must be treated separately and lead to different results than the collision with the enemy itself.

use get class then = then run branch? then the results will only be what you want to trigger the sphere, the get class runs from the Other actor. let me know if that works for you.

As for me, the following solution seems to work: I made the trigger sphere the separate actor and attached it to enemy (AttachActorToActor), then bound a function to its ActorBeginOverlap whereas enemy’s ActorBeginOverlap does another action. But doesn’t this solution bring the hidden side effects?

Unfortunately, the solution above does bring the side effects, at least in significant dropping of FPS. Who knows how to separate collision of the enemy itself and of the trigger sphere, if this sphere is a component and not an actor?

Unfortunately, I found that the problem was in the other place than the header. There is no difference if I make overlap sphere as a component or as a node “Sphere Overlap Actors” (except unnecessary collisions that one has to suppress). Sphere Overlap Actors is better, one just can call it not each frame but, for example, 10 times per second.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.