Jump to content
Unity Insider Forum

Make Collider not collide with specific objects


Gerolmed

Recommended Posts

In my game you have a dash ability. I want my player to bypass enimies while dashing and calling a method on there scripts, he would normally collide with them, but still be able to collide with for ex. Walls. How would I achieve this? Is there there something like ignore in onCollisionEnter/Stay/exit? 

Link zu diesem Kommentar
Auf anderen Seiten teilen

vor 11 Stunden schrieb Zer0Cool:

Yes, you can assign specific layers (like  layer "Enemy" and layer "Walls") to your objects and forbit a collision between these layers. Here you can set this up:
https://docs.unity3d.com/Manual/LayerBasedCollision.html

But I still want to trigger something while going through the enemies

Link zu diesem Kommentar
Auf anderen Seiten teilen

Archiviert

Dieses Thema ist jetzt archiviert und für weitere Antworten gesperrt.

×
×
  • Neu erstellen...