Search Unity

Organising multiple Collider2Ds for better filtering?

Discussion in '2D' started by robc, Feb 7, 2017.

  1. robc

    robc

    Joined:
    Feb 15, 2010
    Posts:
    13
    Hi all,

    I've been stumped for a while on the best way to manage collision filtering for an entity which is made up of multiple sections.

    I'm currently working on a shmup-type game, and at the moment, I've implemented these enemies as a GameObject with children for the various elements (the core, and shielding) - this is done so I can keep them moving about the playfield as one entity (and also with my spawning and management code).

    Of course, this results in Unity making a combined Collider from all those, and I wonder if there's any one out there who's had a similar experience with such a setup, and might have some advice?