r/UnityHelp • u/[deleted] • Aug 03 '21
Question: How Do You Disable Specific Collisions
I am attempting to create a sort of dodge ability for the player in my 2D platformer. But, I do not know how you are supposed to disable/enable certain collisions. Is it possible to put colliders on layers so that they only collide with other colliders on that layer, or something to that effect? Or do you have to manually enable and disable specific collisions?

3
Upvotes
1
u/Bonejob Code Guru Aug 03 '21
The collisions are just the event that starts a process. When that event occurs you can determine if the collision was "dodged" and if so fire a different sequence of events. So collisions always happen it's what you do with it after the collision that is the solution.