Hey, i am making a 2dd game, I’ve created a dash effect. I’ve been trying to get the player to dash through objects by disabling the boxcollider, but it just goes through the floor. Does anyone know a way to fix this?
Tell me how i can make my character dash through hazards and walls without going through the floor o
One way is using layers. For example, have a “Phantom Player” layer. Edit this layer in the physics settings to not collide with Wall or Object layers but collide with ground layers. When you dash, change your players layer to Phantom Player, change back when dash is done.
I can already see the bugs happening from this though. Imagine dashing through an object but you don’t go through it all the way before switching back. Tons of physics weird happenings.
That’s how I handled jumping through the floors at first in my own game while testing.
@Shiro_Rin Thank you, ill see if i can do that. Do u know any tutorials that go through that? Im new to coding.
Not off the top of my head. Try googling “Unity Layers Physics” and looking around.
@Shiro_Rin Alright thanks