Question on the use of Bullet + OnTriggerEnter

Hi,

Collision always happen between colliders. Unlike the EdgeCollider2D, the other colliders have an inner part. For this reason, we always use the entire collider shape if we use a BoxCollider2D.

Trigger colliders do not have a “solid” body, so collisions with trigger colliders do not cause any “physical” behaviour. It fires an event, though: the trigger event which calls the OnTrigger*2D methods of the game objects involved in the current collision.

The bullet is able to move through the BoxCollider2D (trigger), and it won’t get affected by anything unless a trigger event gets fired which invokes a method that destroys the bullet. If there is no such an event/method, the bullet will move through the trigger collider and hit the capsule collider.

Is this what you wanted to know?


See also: