I'm making a platformer 2d game and I couldn't find how to do a dodge roll that can cross enemies. Can someone give an example? Or if you know a tutorial can you share it to me? All tutorials I could find explain how to do a dodge roll but not how to avoid collision with enemies with the dodge. Thank you for your time.
Simply disable the player character's collider at the beginning of the roll and enable it again at the end of the roll. To prevent the character from falling through the world, don't use the same collider for colliding with terrain and enemies. Use two separate colliders and have them collide with different layers: one for terrain, and one for enemies.