Sphere collision overlap

Hi guys, is it possible to constantly keep checking if a certain actor is overlapped by a sphere collision?
I’ve set up a sphere collision which checks if it’s overlapping an actor with a certain interface, the problem is, when it overlaps, take for instance, two actors with the same interface and one of them suddenly leaves the overlap, it sets my variable to false even though it’s still currently overlapping one of them.
Note, I set up a variable to be true if it does overlap the actor with the interface and on end overlap, it sets the variable to false.

You could try using GetOverlappingActors and find whichever one’s you are checking to see are still in your sphere - if one or more is still overlapping, don’t change your variable.

You can specify the actor class you’re looking for in the function call too.

Hi there @ValLevi, hope you’re well!

This topic has been moved from International to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile:

1 Like

Is it possible to give me a blueprint reference

I’m not at my comp with Unreal but:

Here’s the documentation Get Overlapping Actors | Unreal Engine Documentation

But essentially what you could do: OnSphereEndOverlap → GetOverlappingActors (Class = actors you’re checking in sphere)

If array > 0 then you still have an actor of that type overlapping/in your sphere, so don’t set the var to false.

Here’s another thread you could use for reference bp Not getting "Get overlapping Actors" to work - #2 by Mookaroni

Thanks I’ve already got it running

1 Like