Playmaker Forum
PlayMaker News => General Discussion => Topic started by: Handrews on December 04, 2020, 09:20:49 AM
-
There is any way to get all gameobjects with an specific tag inside a circular radius? I tried using trigger event with a sphere collider but it only get one "enemy" at a time.
-
Hi,
You can use the Addon ArrayMaker (https://hutonggames.fogbugz.com/default.asp?W715) to create dynamic lists and ArrayListSortGameObjectByDistance (https://github.com/jeanfabre/PlayMaker--ArrayMaker--U4.3.4-SubModule-/blob/master/Addons/Custom/GameObject/ArrayListSortGameObjectByDistance.cs).
-
You can also use the Get Overlap actions available on the Ecosystem:
https://hutonggames.fogbugz.com/f/page?W1181
-
Ya, the idea of “getting” objects within a certain range isnt normal default function. Find object by type or simular methods can b used, but they get everything, then you filter through the array of those by distance, overlap sphere or overlap box are like a raycast in a area, that can get everything, which can use a layer mask, towhich you would just filter that array list by tag too.