Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ch1ky3n on January 08, 2019, 09:25:43 AM

Title: Thought about stacking colliders
Post by: ch1ky3n 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
Title: Re: Thought about stacking colliders
Post by: ... 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?
Title: Re: Thought about stacking colliders
Post by: ch1ky3n 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