Gerolmed Geschrieben 31. Juli 2017 Melden Share Geschrieben 31. Juli 2017 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 More sharing options...
Zer0Cool Geschrieben 31. Juli 2017 Melden Share Geschrieben 31. Juli 2017 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 Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Gerolmed Geschrieben 1. August 2017 Autor Melden Share Geschrieben 1. August 2017 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 More sharing options...
Zer0Cool Geschrieben 1. August 2017 Melden Share Geschrieben 1. August 2017 I think if you set "is Trigger" on the all colliders of enemies then only the "OnTigger..." methods will be called. Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Recommended Posts
Archiviert
Dieses Thema ist jetzt archiviert und für weitere Antworten gesperrt.