- Home /
Question by
unity_pE71tnQwvrMg1A · Jan 25, 2021 at 05:36 PM ·
2d gamecollision detectionlayers
how to avoid collision between first and third layer when second is between them? 2D
I have 3 layers: car, track and outOfTrack layer. Under car and track is outOfTrack layer. When a car is on track the collision between car and outOfTrack is detected, so i want to avoid it somehow. How to avoid collision detecting between car and outOfTrack when car is on track, and detecting it only when car is touching outOfTrack?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613023931im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to bring empty game object in front of other Panels? 1 Answer
When would you want to use Layer-Based Collision Detection and why? 1 Answer
Why is OnCollisionEnter2D called when it's layer's collisions are being ignored? 1 Answer
Temporary disable collision, what's best performance-wise 1 Answer
2D collision not registering 1 Answer