- Home /
When would you want to use Layer-Based Collision Detection and why?
I was reading the Unity Manual and came across the Layer-Based Collision Detection and it sounds awesome but I can't think of a lot of practical reasons when you would want to use it. Maybe I'm just not thinking creatively right now, if anyone has ideas or suggestions I would appreciate it!
Answer by noooodley · Jun 19, 2014 at 03:36 AM
Layer-Based Collision Detection is useful when you want to select what an object collides with. Some examples:
A ghost that can be hit with some projectiles but not others.
A two-player game where each person has a safe zone. Player 1 cannot enter Player 2's safe-zone and vice-versa.
A game where friendly-fire is disabled. Projectiles pass through teammates but will hit enemies.
Hope this helps.
Your answer
Follow this Question
Related Questions
make the layer "IgnoreRaycast" work with collisions. 0 Answers
Linecast between character and camera doesn't ignoring Characters collider. 2 Answers
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
how to avoid collision between first and third layer when second is between them? 2D 0 Answers