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!

--

--

--

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!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Know the C++ Libraries for Developers in 2021

Extracting Similar Data: Using K-D trees to efficiently locate nearest neighbors

Solving the inner dev loop with microservices

Learn from experts and shape your path to mastery

Four Key Tenets of API Design

Getting into grep

5 Most Useful Linux Commands For Beginners

Want to get inspired by some of the sharpest new talent in tech?

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

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!

More from Medium

Dev Diary #3 — Improving a Credit Rating System and Interface

How to present Covid-19 information in the United States? Design for Understanding

Dolphins Continue Road Trip in Chicago

Difference between BC and AD