- Home /
Question by
$$anonymous$$ · Jun 28, 2018 at 03:08 AM ·
trigger2d collision
How to stop large trigger collider from masking small regular collider? (2D)
Hello. So I've got a large CircleCollider2D that is being used as a trigger for the enemy's circle of sight, and a much smaller normal CircleCollider2D that is being used as the solid collider for the enemy. The enemy will detect other enemies and the player based on the trigger intersecting with the smaller CircleCollider2D that is a component of said enemy or player. So the issue is that the enemy is detecting the trigger collider (which I don't want to detect) but not detecting the solid smaller collider (which I do want).
Comment
Best Answer
Answer by ahstein · Jun 28, 2018 at 06:21 AM
Put the trigger colliders on empty child gameobjects. Put those gameobjects on their own layer and set up that layer so it does not collide with itself.