Working with Collision Layers in Unity

Objective: How to set-up and use Collision Layers on the Unity Engine.

What’s a Collision Layer?

Collision layers are a concept used by physics engines to decide which objects should collide with which other objects. — eZEngine

This is how the Collision Layer matrix looks. Inside the red square I specify the intersection of two layers: Enemy and Player.

If we create to different gameObjects with a RigidBody and a Collider attached they will trigger each other.

Go to Edit > Project Settings to see the Collision Matrix.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response