What is the best way of doing a radius foreach loop in blueprint?
Hi I'd like to check for pawns with in radius of an actor in blueprint, whats the best way of doing this now?
All the best
asked Jul 24 '14 at 11:53 AM in Blueprint Scripting
You can use the 'get all actors of class' node to get an array of objects you want, and feed that into a for each loop. From there, use the 'get path length' node, giving the path start and end values as the locations of the central actor and the pawn to be checked, and compare that length to your radius.
Here's what the blueprint would look like:
answered Jul 24 '14 at 12:26 PM
Additionally, you can do a sphere trace for objects if you are not worried about getting things above or below you.
answered Jul 24 '14 at 12:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here