I’m making a 2D Android game and I need two colliders on each object.
One is a box collider that’s a little bigger than the sprite to act as a hit box and detect whether the user has touched the object. It needs to be a little bigger than the sprite so that the touch will still be recognised if the user touches a little bit outside the object.
The other is a polygon collider that matches the shape of the sprite - I want this to act as a trigger to use with the OnTriggerEnter method.
The problem is that both colliders are acting as a trigger and activating the OnTriggerEnter method, which means the method is running when another object comes close to the object since the Box Collider is bigger than the sprite.
I’ve unticked the ‘Is Trigger’ box on the Box Collider but it hasn’t helped.
Is there a way to have two colliders on on object but only have one act as a trigger? Does anyone have any other suggestions as to how to solve this problem?