playMaker

Author Topic: ArrayList Find GameObjects Inside Collider  (Read 758 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
ArrayList Find GameObjects Inside Collider
« on: December 02, 2015, 07:43:05 AM »
Add to an array all the objects (3d or 2d) which are inside a collider. Extension to http://hutonggames.com/playmakerforum/index.php?topic=11673.0

Filter by tag (obligatory) then optionally by layer.

2 actions:
- ArrayList Find GameObjects Inside Collider
- ArrayList Find GameObjects Inside Collider2D

on ecosystem or https://snipt.net/dudebxl/
« Last Edit: December 02, 2015, 08:21:16 AM by dudebxl »

foxdeltagames

  • Junior Playmaker
  • **
  • Posts: 62
    • View Profile
Re: ArrayList Find GameObjects Inside Collider
« Reply #1 on: December 02, 2015, 11:01:26 AM »
nice! this can come in handy :)

Acavodo

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: ArrayList Find GameObjects Inside Collider
« Reply #2 on: July 15, 2017, 03:52:47 AM »
Hi! Im trying to use this action for bomb effect.

Here's capture for my setting.


it is not finding any object which I tagged correctly.

I think "Collider Target" needs its own collider component right?

help !

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
    • My Prototypes
Re: ArrayList Find GameObjects Inside Collider
« Reply #3 on: October 16, 2017, 10:34:05 AM »
Hello,

I think I found a small bug about the action, it seems like the Root GameObject requires to have a Mesh Renderer for this action to add it to the Array List.

Right now I have a gameobject (Tile) within it I have a child gameobject (Mesh) so I could easily swap out the placeholder in the future and this is causing it to not add the Tile into the Array List.

A work-around that I'm using now is to add a MeshRenderer on the root gameobject with nothing in it so the action could detect it.

Tri Nguyen

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: ArrayList Find GameObjects Inside Collider
« Reply #4 on: October 16, 2017, 11:29:23 PM »
Hi,

 I checked the action and yes, it's a requirement, is that a problem for your case?

 Bye,

 Jean

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
    • My Prototypes
Re: ArrayList Find GameObjects Inside Collider
« Reply #5 on: October 17, 2017, 07:47:33 AM »
Hello,

Maybe it's just my workflow that makes me think it's a bug.
I usually have the Root contain all the scripts/FSM and have its Child be the mesh, that way i could always update the mesh whenever I want to without having to add the script/FSM again. Because of this, my Root gameobject don't have a mesh renderer and that causes the action to not work.

Tri Nguyen

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
    • My Prototypes
Re: ArrayList Find GameObjects Inside Collider
« Reply #6 on: October 18, 2017, 09:58:55 AM »
Hello,

The action does not seem to work if it is on a prefab that gets instantiated.
I tested this by:
  • instantiating the prefab at 0,0,0 with object tagged as 'Tile' at the same location but the Play Maker Array List Proxy does not update
  • then I tried placing the prefab at 0,0,0 beforehand without instantiating and it managed to grab the objects that are tagged as 'Tile'

Tri Nguyen