Hey there, beginner Unity user here. I’ve been struggling to trying to make my first game for quite a while now, which is supposed to be an infinite runner with platforms that can be jumped and dropped through. The problem I’m facing is that I’m not sure how to code this feature into the platforms; surprisingly, no tutorial on YouTube really seems to be able to answer my issues. I’ve tried using IgnoreLayerCollision to make the player and platform layers not collide but am not sure how to re-enable collisions in time without using a timer (which seems inconsistent). I’ve also tried using a PlatformEffector2D with a surface arc of 180 degrees that flips whenever jump or drop is executed but I’m also facing problems there. It’s been a couple months since I faced this issue and I haven’t progressed much, and really only realized now that I should be asking other folks for suggestions on this, which honestly seems like such a simple issue. Do you guys know how to code this?
You can enable and disable the collider component using a coroutine.