How to check which actors are in the arc area?

I first found the actors in the desired radius with the “Sphere Overlap Actors” node.
And I calculated the angle from the positions of the above actors and the position of the origin of the arc to determine if the actor was in the arc.

However, this method did not produce satisfactory results.
This is because the actors had a volume (capsule or any other primitives) and were not included in the arc when calculated by location, but were sometimes marked in the arc when considering the volume.

I think I need to change my approach, but I don’t have any ideas.
I beg for your help. Thank you.

Make sure that the actor only has one component that is handling “Generate Overlap Events” set to TRUE. Instead of using “get actor location” for your distance calculations try using “get world location” and passing in the component that is handing the overlap collision for your distance calculations.

I’m not sure if this is your problem as its a little confusing without some pics of what you are trying to accomplish, but I hope this helps if it is :slight_smile:

Oh, I’m sorry. My explanation was a little lacking.

I wanted to make a hit decision in a range similar to the cone indicator skill range of the MOBA game.

However, there seemed to be no node in the blueprint that provided such overlap testing.
So I first used the “Sphere Overlap Actors” node and then added angle checking logic.

1 Like

You can use the component itself to check for collision overlap with pawns (for example) and update an array of collided pawns on begin and end overlap.

In this case I’m using a sphere, but you can use whatever component you like, including custom, hidden in game static meshes shaped like cones.

1 Like

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