playMaker

Author Topic: checking for 2 or more collisions at the same time  (Read 1695 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
checking for 2 or more collisions at the same time
« on: March 16, 2014, 02:36:34 PM »
Hi,
Is there a efficient way of using bools or something to detect up to 3 collisions at the same time?
So if I have obj1, obj2 and ob3, moving at random times towards a wall, each has its own collider, how can I check for 2 or 3 collisions at the same time? I have one FSM on each obj with a trigger and set bool and a FSM on the wall that checks for the collisions.

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: checking for 2 or more collisions at the same time
« Reply #1 on: March 17, 2014, 03:11:54 PM »
anyone? Im really stuck on this one.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: checking for 2 or more collisions at the same time
« Reply #2 on: March 18, 2014, 08:48:27 AM »
Hi,

you need to maintain a high level fsm dealing with counting these triggers. so each gameobject will send an event "I HAVE BEEN TRIGGERED" or something, this high level fsm catchs it and keep counting and act based on this counter.

bye,

 Jean

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: checking for 2 or more collisions at the same time
« Reply #3 on: March 18, 2014, 01:13:50 PM »
Thanks Jean, makes sense but it's really tricky to get it working. I'll keep at it.