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!

I’m firing my lasers and they’re not working!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Lengen

Andrew Lengen

7 Followers

If ambition and practicality amalgamated, it would be me! I am here to climb the mountains of my ambition and catalog my journey so that someone can be changed!