playMaker

Author Topic: Get GameObjects in a specific radius  (Read 2110 times)

Handrews

  • Playmaker Newbie
  • *
  • Posts: 36
  • 3D Artist & Game Developer
    • Thetra Games Artstation
Get GameObjects in a specific radius
« 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.

MlleBun

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Get GameObjects in a specific radius
« Reply #1 on: December 05, 2020, 06:27:14 AM »
Hi,
You can use the Addon ArrayMaker to create dynamic lists and ArrayListSortGameObjectByDistance.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Get GameObjects in a specific radius
« Reply #2 on: December 05, 2020, 10:53:40 AM »
You can also use the Get Overlap actions available on the Ecosystem:
https://hutonggames.fogbugz.com/f/page?W1181

Prestonh

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Get GameObjects in a specific radius
« Reply #3 on: December 13, 2020, 03:15:44 PM »
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.