Box Collider 2D
Now that we have the basis set-up, let’s get our “Edit Collider” in our Box Collider 2D to match the size of our ship(s) more!
Now that we have the correct sizes for our colliders, if we play-test we notice one big thing… the collision still does not work, why? OnTriggerEnter(), which is used in 3D-triggered collisions. An easy fix!
Head into our “Enemy” script, and change OnTriggerEnter() to OnTriggerEnter2D() and change our “Collider” inside of the method to “Collider2D”. Save the script, play-test and… we are almost there. We just need to get the lasers working!