Question by
sddayord · Aug 26, 2018 at 09:43 AM ·
physics2dcollider2dsorting layerssorting order
Adding sorting group disables BoxCollider2D
Ok so here's the setup: we have a team clicker 2D for mobile. We have "enemies" which are game objects having a rig child which contains the individual sprites for the rig - the very standard stuff out of the tutorials. We also have a collider/kinematic rigidbodies attached to the rig, not the parent. Then we have the selection circle object the point of which is to highlight enemies within it. It also has a collider/rigid body with isTrigger. This WORKS until you attach a sorting group to the enemy rigs to prevent them from clippling through each other! And yes I check the Physics2D Layer Collision matrix. Anyone have an idea why the sorting group is disabling the collision detection?
enemy.jpg
(345.3 kB)
selection-circle.jpg
(323.9 kB)
Comment