playMaker

Author Topic: Thought about stacking colliders  (Read 1063 times)

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Thought about stacking colliders
« on: January 08, 2019, 09:25:43 AM »
Hey guys, i was wondering on is there another trick on how to detect stacking 2d colliders beside raycasting ?

I make a simple 2d platformer game, where the enemies physics layers allows them to stacked on each other, when the player on the other side shoot em with bullet, all of them got hit by the bullet when they stack to each other. What i want is to hit only the front one, and when the front one dies, it will hit the next one behind it and so on

Is there any simple and efficient method to overcome this?

Thanks

Thanks
« Last Edit: January 08, 2019, 09:37:28 AM by ch1ky3n »

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Thought about stacking colliders
« Reply #1 on: January 08, 2019, 09:43:30 AM »
So when the enemies get together, they basically act like they are all under one collider, right?
Available for Playmaker work

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: Thought about stacking colliders
« Reply #2 on: January 09, 2019, 12:31:08 AM »
Yup, but only if they are all in identical position, for example getting blocked by something in front of them, so they all become stacked to each other